
<!-- saved from url=(0068)https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX58 -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<!-- This HTML file has been created by texi2html 1.52
     from ../texi/ld.texinfo on 7 November 1998 -->

<title>Using LD, the GNU linker</title>
</head>
<body>
<h1>Using ld</h1>
<h2>The GNU linker</h2>
<h2><code>ld</code> version 2</h2>
<h2>January 1994</h2>
<address>Steve Chamberlain</address>
<address>Cygnus Support</address>
<p>
</p><p></p><hr><p>
</p><h1>Table of Contents</h1>
<ul>
<li><a name="TOC1" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC1">Overview</a>
</li><li><a name="TOC2" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC2">Invocation</a>
<ul>
<li><a name="TOC3" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC3">Command Line Options</a>
</li><li><a name="TOC4" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC4">Environment Variables</a>
</li></ul>
</li><li><a name="TOC5" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC5">Command Language</a>
<ul>
<li><a name="TOC6" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC6">Linker Scripts</a>
</li><li><a name="TOC7" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC7">Expressions</a>
<ul>
<li><a name="TOC8" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC8">Integers</a>
</li><li><a name="TOC9" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC9">Symbol Names</a>
</li><li><a name="TOC10" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC10">The Location Counter</a>
</li><li><a name="TOC11" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC11">Operators</a>
</li><li><a name="TOC12" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC12">Evaluation</a>
</li><li><a name="TOC13" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC13">Assignment: Defining Symbols</a>
</li><li><a name="TOC14" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC14">Arithmetic Functions</a>
</li><li><a name="TOC15" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC15">Semicolons</a>
</li></ul>
</li><li><a name="TOC16" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC16">Memory Layout</a>
</li><li><a name="TOC17" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC17">Specifying Output Sections</a>
<ul>
<li><a name="TOC18" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC18">Section Definitions</a>
</li><li><a name="TOC19" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC19">Section Placement</a>
</li><li><a name="TOC20" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC20">Section Data Expressions</a>
</li><li><a name="TOC21" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC21">Optional Section Attributes</a>
</li><li><a name="TOC22" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC22">Overlays</a>
</li></ul>
</li><li><a name="TOC23" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC23">ELF Program Headers</a>
</li><li><a name="TOC24" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC24">The Entry Point</a>
</li><li><a name="TOC25" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC25">Version Script</a>
</li><li><a name="TOC26" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC26">Option Commands</a>
</li></ul>
</li><li><a name="TOC27" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC27">Machine Dependent Features</a>
<ul>
<li><a name="TOC28" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC28"><code>ld</code> and the H8/300</a>
</li><li><a name="TOC29" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC29"><code>ld</code> and the Intel 960 family</a>
</li></ul>
</li><li><a name="TOC30" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC30">BFD</a>
<ul>
<li><a name="TOC31" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC31">How it works: an outline of BFD</a>
<ul>
<li><a name="TOC32" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC32">Information Loss</a>
</li><li><a name="TOC33" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC33">The BFD canonical object-file format</a>
</li></ul>
</li></ul>
</li><li><a name="TOC34" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC34">Reporting Bugs</a>
<ul>
<li><a name="TOC35" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC35">Have you found a bug?</a>
</li><li><a name="TOC36" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC36">How to report bugs</a>
</li></ul>
</li><li><a name="TOC37" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC37">MRI Compatible Script Files</a>
</li><li><a name="TOC38" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC38">Index</a>
</li></ul>
<p></p><hr><p>

</p><p>

</p><p>
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.

</p>
<p>
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.

</p>
<p>
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that
the entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

</p>
<p>
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions.

</p>



<h1><a name="SEC1" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC1">Overview</a></h1>

<p>
<a name="IDX1"></a>
<a name="IDX2"></a>
<code>ld</code> combines a number of object and archive files, relocates
their data and ties up symbol references. Usually the last step in
compiling a program is to run <code>ld</code>.

</p>
<p>
<code>ld</code> accepts Linker Command Language files written in
a superset of AT&amp;T's Link Editor Command Language syntax,
to provide explicit and total control over the linking process.

</p>
<p>
This version of <code>ld</code> uses the general purpose BFD libraries
to operate on object files. This allows <code>ld</code> to read, combine, and
write object files in many different formats--for example, COFF or
<code>a.out</code>.  Different formats may be linked together to produce any
available kind of object file.  See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC30">BFD</a>, for more information.

</p>
<p>
Aside from its flexibility, the GNU linker is more helpful than other
linkers in providing diagnostic information.  Many linkers abandon
execution immediately upon encountering an error; whenever possible,
<code>ld</code> continues executing, allowing you to identify other errors
(or, in some cases, to get an output file in spite of the error).

</p>


<h1><a name="SEC2" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC2">Invocation</a></h1>

<p>
The GNU linker <code>ld</code> is meant to cover a broad range of situations,
and to be as compatible as possible with other linkers.  As a result,
you have many choices to control its behavior.

</p>



<h2><a name="SEC3" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC3">Command Line Options</a></h2>

<p>
<a name="IDX3"></a>
<a name="IDX4"></a>
The linker supports a plethora of command-line options, but in actual
practice few of them are used in any particular context.
<a name="IDX5"></a>
For instance, a frequent use of <code>ld</code> is to link standard Unix
object files on a standard, supported Unix system.  On such a system, to
link a file <code>hello.o</code>:

</p>

<pre>ld -o <var>output</var> /lib/crt0.o hello.o -lc
</pre>

<p>
This tells <code>ld</code> to produce a file called <var>output</var> as the
result of linking the file <code>/lib/crt0.o</code> with <code>hello.o</code> and
the library <code>libc.a</code>, which will come from the standard search
directories.  (See the discussion of the <samp>`-l'</samp> option below.)

</p>
<p>
The command-line options to <code>ld</code> may be specified in any order, and
may be repeated at will.  Repeating most options with a different
argument will either have no further effect, or override prior
occurrences (those further to the left on the command line) of that
option.  Options which may be meaningfully specified more than once are
noted in the descriptions below.

</p>
<p>
<a name="IDX6"></a>
Non-option arguments are objects files which are to be linked together.
They may follow, precede, or be mixed in with command-line options,
except that an object file argument may not be placed between an option
and its argument.

</p>
<p>
Usually the linker is invoked with at least one object file, but you can
specify other forms of binary input files using <samp>`-l'</samp>, <samp>`-R'</samp>,
and the script command language.  If <em>no</em> binary input files at all
are specified, the linker does not produce any output, and issues the
message <samp>`No input files'</samp>.

</p>
<p>
If the linker can not recognize the format of an object file, it will
assume that it is a linker script.  A script specified in this way
augments the main linker script used for the link (either the default
linker script or the one specified by using <samp>`-T'</samp>).  This feature
permits the linker to link against a file which appears to be an object
or an archive, but actually merely defines some symbol values, or uses
<code>INPUT</code> or <code>GROUP</code> to load other objects.  Note that
specifying a script in this way should only be used to augment the main
linker script; if you want to use some command that logically can only
appear once, such as the <code>SECTIONS</code> or <code>MEMORY</code> command, you
must replace the default linker script using the <samp>`-T'</samp> option.
See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC5">Command Language</a>.

</p>
<p>
For options whose names are a single letter,
option arguments must either follow the option letter without intervening
whitespace, or be given as separate arguments immediately following the
option that requires them.

</p>
<p>
For options whose names are multiple letters, either one dash or two can
precede the option name; for example, <samp>`--oformat'</samp> and
<samp>`--oformat'</samp> are equivalent.  Arguments to multiple-letter options
must either be separated from the option name by an equals sign, or be
given as separate arguments immediately following the option that
requires them.  For example, <samp>`--oformat srec'</samp> and
<samp>`--oformat=srec'</samp> are equivalent.  Unique abbreviations of the names
of multiple-letter options are accepted.

</p>
<dl compact="">

<dt><code>-a<var>keyword</var></code>
</dt><dd>
<a name="IDX7"></a>
 
This option is supported for HP/UX compatibility.  The <var>keyword</var>
argument must be one of the strings <samp>`archive'</samp>, <samp>`shared'</samp>, or
<samp>`default'</samp>.  <samp>`-aarchive'</samp> is functionally equivalent to
<samp>`-Bstatic'</samp>, and the other two keywords are functionally equivalent
to <samp>`-Bdynamic'</samp>.  This option may be used any number of times.

<a name="IDX8"></a>
<a name="IDX9"></a>
</dd><dt><code>-A<var>architecture</var></code>
</dt><dd>
<a name="IDX10"></a>
</dd><dt><code>--architecture=<var>architecture</var></code>
</dt><dd>
In the current release of <code>ld</code>, this option is useful only for the
Intel 960 family of architectures.  In that <code>ld</code> configuration, the
<var>architecture</var> argument identifies the particular architecture in
the 960 family, enabling some safeguards and modifying the
archive-library search path.  See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC29"><code>ld</code> and the Intel 960 family</a>, for details.

Future releases of <code>ld</code> may support similar functionality for
other architecture families.

<a name="IDX11"></a>
<a name="IDX12"></a>
<a name="IDX13"></a>
<a name="IDX14"></a>
<a name="IDX15"></a>
</dd><dt><code>-b <var>input-format</var></code>
</dt><dd>
</dd><dt><code>--format=<var>input-format</var></code>
</dt><dd>
<code>ld</code> may be configured to support more than one kind of object
file.  If your <code>ld</code> is configured this way, you can use the
<samp>`-b'</samp> option to specify the binary format for input object files
that follow this option on the command line.  Even when <code>ld</code> is
configured to support alternative object formats, you don't usually need
to specify this, as <code>ld</code> should be configured to expect as a
default input format the most usual format on each machine.
<var>input-format</var> is a text string, the name of a particular format
supported by the BFD libraries.  (You can list the available binary
formats with <samp>`objdump -i'</samp>.)
See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC30">BFD</a>.

You may want to use this option if you are linking files with an unusual
binary format.  You can also use <samp>`-b'</samp> to switch formats explicitly (when
linking object files of different formats), by including
<samp>`-b <var>input-format</var>'</samp> before each group of object files in a
particular format.  

The default format is taken from the environment variable
<code>GNUTARGET</code>.
See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC4">Environment Variables</a>.
You can also define the input
format from a script, using the command <code>TARGET</code>; see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC26">Option Commands</a>.

<a name="IDX16"></a>
<a name="IDX17"></a>
<a name="IDX18"></a>
</dd><dt><code>-c <var>MRI-commandfile</var></code>
</dt><dd>
</dd><dt><code>--mri-script=<var>MRI-commandfile</var></code>
</dt><dd>
For compatibility with linkers produced by MRI, <code>ld</code> accepts script
files written in an alternate, restricted command language, described in
section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC37">MRI Compatible Script Files</a>.  Introduce MRI script files with
the option <samp>`-c'</samp>; use the <samp>`-T'</samp> option to run linker
scripts written in the general-purpose <code>ld</code> scripting language.
If <var>MRI-cmdfile</var> does not exist, <code>ld</code> looks for it in the directories
specified by any <samp>`-L'</samp> options.

<a name="IDX19"></a>
<a name="IDX20"></a>
<a name="IDX21"></a>
<a name="IDX22"></a>
</dd><dt><code>-d</code>
</dt><dd>
</dd><dt><code>-dc</code>
</dt><dd>
</dd><dt><code>-dp</code>
</dt><dd>
These three options are equivalent; multiple forms are supported for
compatibility with other linkers.  They
assign space to common symbols even if a relocatable output file is
specified (with <samp>`-r'</samp>).  The script command
<code>FORCE_COMMON_ALLOCATION</code> has the same effect.  See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC26">Option Commands</a>.

<a name="IDX23"></a>
<a name="IDX24"></a>
<a name="IDX25"></a>
</dd><dt><code>-e <var>entry</var></code>
</dt><dd>
</dd><dt><code>--entry=<var>entry</var></code>
</dt><dd>
Use <var>entry</var> as the explicit symbol for beginning execution of your
program, rather than the default entry point. See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC24">The Entry Point</a>, for a
discussion of defaults and other ways of specifying the
entry point.

<a name="IDX26"></a>
<a name="IDX27"></a>
<a name="IDX28"></a>
</dd><dt><code>-E</code>
</dt><dd>
</dd><dt><code>--export-dynamic</code>
</dt><dd>
When creating a dynamically linked executable, add all symbols to the
dynamic symbol table.  The dynamic symbol table is the set of symbols
which are visible from dynamic objects at run time.

If you do not use this option, the dynamic symbol table will normally
contain only those symbols which are referenced by some dynamic object
mentioned in the link.

If you use <code>dlopen</code> to load a dynamic object which needs to refer
back to the symbols defined by the program, rather than some other
dynamic object, then you will probably need to use this option when
linking the program itself.

<a name="IDX29"></a>
<a name="IDX30"></a>
</dd><dt><code>-f</code>
</dt><dd>
</dd><dt><code>--auxiliary <var>name</var></code>
</dt><dd>
When creating an ELF shared object, set the internal DT_AUXILIARY field
to the specified name.  This tells the dynamic linker that the symbol
table of the shared object should be used as an auxiliary filter on the
symbol table of the shared object <var>name</var>.

If you later link a program against this filter object, then, when you
run the program, the dynamic linker will see the DT_AUXILIARY field.  If
the dynamic linker resolves any symbols from the filter object, it will
first check whether there is a definition in the shared object
<var>name</var>.  If there is one, it will be used instead of the definition
in the filter object.  The shared object <var>name</var> need not exist.
Thus the shared object <var>name</var> may be used to provide an alternative
implementation of certain functions, perhaps for debugging or for
machine specific performance.

This option may be specified more than once.  The DT_AUXILIARY entries
will be created in the order in which they appear on the command line.

<a name="IDX31"></a>
<a name="IDX32"></a>
</dd><dt><code>-F <var>name</var></code>
</dt><dd>
</dd><dt><code>--filter <var>name</var></code>
</dt><dd>
When creating an ELF shared object, set the internal DT_FILTER field to
the specified name.  This tells the dynamic linker that the symbol table
of the shared object which is being created should be used as a filter
on the symbol table of the shared object <var>name</var>.

If you later link a program against this filter object, then, when you
run the program, the dynamic linker will see the DT_FILTER field.  The
dynamic linker will resolve symbols according to the symbol table of the
filter object as usual, but it will actually link to the definitions
found in the shared object <var>name</var>.  Thus the filter object can be
used to select a subset of the symbols provided by the object
<var>name</var>.

Some older linkers used the <code>-F</code> option throughout a compilation
toolchain for specifying object-file format for both input and output
object files.  The GNU linker uses other mechanisms for this
purpose: the <code>-b</code>, <code>--format</code>, <code>--oformat</code> options, the
<code>TARGET</code> command in linker scripts, and the <code>GNUTARGET</code>
environment variable.  The GNU linker will ignore the <code>-F</code>
option when not creating an ELF shared object.

<a name="IDX33"></a>
</dd><dt><code>--force-exe-suffix</code>
</dt><dd>
Make sure that an output file has a .exe suffix.

If a successfully built fully linked output file does not have a
<code>.exe</code> or <code>.dll</code> suffix, this option forces the linker to copy
the output file to one of the same name with a <code>.exe</code> suffix. This
option is useful when using unmodified Unix makefiles on a Microsoft
Windows host, since some versions of Windows won't run an image unless
it ends in a <code>.exe</code> suffix.

<a name="IDX34"></a>
</dd><dt><code>-g</code>
</dt><dd>
Ignored.  Provided for compatibility with other tools.

<a name="IDX35"></a>
<a name="IDX36"></a>
<a name="IDX37"></a>
</dd><dt><code>-G<var>value</var></code>
</dt><dd>
</dd><dt><code>--gpsize=<var>value</var></code>
</dt><dd>
Set the maximum size of objects to be optimized using the GP register to
<var>size</var>.  This is only meaningful for object file formats such as
MIPS ECOFF which supports putting large and small objects into different
sections.  This is ignored for other object file formats.

<a name="IDX38"></a>
<a name="IDX39"></a>
<a name="IDX40"></a>
</dd><dt><code>-h<var>name</var></code>
</dt><dd>
</dd><dt><code>-soname=<var>name</var></code>
</dt><dd>
When creating an ELF shared object, set the internal DT_SONAME field to
the specified name.  When an executable is linked with a shared object
which has a DT_SONAME field, then when the executable is run the dynamic
linker will attempt to load the shared object specified by the DT_SONAME
field rather than the using the file name given to the linker.

<a name="IDX41"></a>
<a name="IDX42"></a>
</dd><dt><code>-i</code>
</dt><dd>
Perform an incremental link (same as option <samp>`-r'</samp>).

<a name="IDX43"></a>
<a name="IDX44"></a>
<a name="IDX45"></a>
</dd><dt><code>-l<var>archive</var></code>
</dt><dd>
</dd><dt><code>--library=<var>archive</var></code>
</dt><dd>
Add archive file <var>archive</var> to the list of files to link.  This
option may be used any number of times.  <code>ld</code> will search its
path-list for occurrences of <code>lib<var>archive</var>.a</code> for every
<var>archive</var> specified.

On systems which support shared libraries, <code>ld</code> may also search for
libraries with extensions other than <code>.a</code>.  Specifically, on ELF
and SunOS systems, <code>ld</code> will search a directory for a library with
an extension of <code>.so</code> before searching for one with an extension of
<code>.a</code>.  By convention, a <code>.so</code> extension indicates a shared
library.

The linker will search an archive only once, at the location where it is
specified on the command line.  If the archive defines a symbol which
was undefined in some object which appeared before the archive on the
command line, the linker will include the appropriate file(s) from the
archive.  However, an undefined symbol in an object appearing later on
the command line will not cause the linker to search the archive again.

See the <code>-(</code> option for a way to force the linker to search
archives multiple times.

You may list the same archive multiple times on the command line.

This type of archive searching is standard for Unix linkers.  However,
if you are using <code>ld</code> on AIX, note that it is different from the
behaviour of the AIX linker.

<a name="IDX46"></a>
<a name="IDX47"></a>
<a name="IDX48"></a>
</dd><dt><code>-L<var>searchdir</var></code>
</dt><dd>
</dd><dt><code>--library-path=<var>searchdir</var></code>
</dt><dd>
Add path <var>searchdir</var> to the list of paths that <code>ld</code> will search
for archive libraries and <code>ld</code> control scripts.  You may use this
option any number of times.  The directories are searched in the order
in which they are specified on the command line.  Directories specified
on the command line are searched before the default directories.  All
<code>-L</code> options apply to all <code>-l</code> options, regardless of the
order in which the options appear.

The default set of paths searched (without being specified with
<samp>`-L'</samp>) depends on which emulation mode <code>ld</code> is using, and in
some cases also on how it was configured.  See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC4">Environment Variables</a>.

The paths can also be specified in a link script with the
<code>SEARCH_DIR</code> command.  Directories specified this way are searched
at the point in which the linker script appears in the command line.

<a name="IDX49"></a>
<a name="IDX50"></a>
</dd><dt><code>-m<var>emulation</var></code>
</dt><dd>
Emulate the <var>emulation</var> linker.  You can list the available
emulations with the <samp>`--verbose'</samp> or <samp>`-V'</samp> options.

If the <samp>`-m'</samp> option is not used, the emulation is taken from the
<code>LDEMULATION</code> environment variable, if that is defined.

Otherwise, the default emulation depends upon how the linker was
configured.

<a name="IDX51"></a>
<a name="IDX52"></a>
<a name="IDX53"></a>
</dd><dt><code>-M</code>
</dt><dd>
</dd><dt><code>--print-map</code>
</dt><dd>
Print a link map to the standard output.  A link map provides
information about the link, including the following:


<ul>
<li>

Where object files and symbols are mapped into memory.
</li><li>

How common symbols are allocated.
</li><li>

All archive members included in the link, with a mention of the symbol
which caused the archive member to be brought in.
</li></ul>

<a name="IDX54"></a>
<a name="IDX55"></a>
<a name="IDX56"></a>
<a name="IDX57"></a>
</dd><dt><code>-n</code>
</dt><dd>
</dd><dt><code>--nmagic</code>
</dt><dd>
Set the text segment to be read only, and mark the output as
<code>NMAGIC</code> if possible.

<a name="IDX58"></a>
<a name="IDX59"></a>
<a name="IDX60"></a>
<a name="IDX61"></a>
</dd><dt><code>-N</code>
</dt><dd>
</dd><dt><code>--omagic</code>
</dt><dd>
Set the text and data sections to be readable and writable.  Also, do
not page-align the data segment.  If the output format supports Unix
style magic numbers, mark the output as <code>OMAGIC</code>.

<a name="IDX62"></a>
<a name="IDX63"></a>
<a name="IDX64"></a>
</dd><dt><code>-o <var>output</var></code>
</dt><dd>
</dd><dt><code>--output=<var>output</var></code>
</dt><dd>
Use <var>output</var> as the name for the program produced by <code>ld</code>; if this
option is not specified, the name <tt>`a.out'</tt> is used by default.  The
script command <code>OUTPUT</code> can also specify the output file name.

<a name="IDX65"></a>
<a name="IDX66"></a>
<a name="IDX67"></a>
<a name="IDX68"></a>
</dd><dt><code>-r</code>
</dt><dd>
</dd><dt><code>--relocateable</code>
</dt><dd>
Generate relocatable output--i.e., generate an output file that can in
turn serve as input to <code>ld</code>.  This is often called <em>partial
linking</em>.  As a side effect, in environments that support standard Unix
magic numbers, this option also sets the output file's magic number to
<code>OMAGIC</code>.
If this option is not specified, an absolute file is produced.  When
linking C++ programs, this option <em>will not</em> resolve references to
constructors; to do that, use <samp>`-Ur'</samp>.

This option does the same thing as <samp>`-i'</samp>.

<a name="IDX69"></a>
<a name="IDX70"></a>
<a name="IDX71"></a>
</dd><dt><code>-R <var>filename</var></code>
</dt><dd>
</dd><dt><code>--just-symbols=<var>filename</var></code>
</dt><dd>
Read symbol names and their addresses from <var>filename</var>, but do not
relocate it or include it in the output.  This allows your output file
to refer symbolically to absolute locations of memory defined in other
programs.  You may use this option more than once.

For compatibility with other ELF linkers, if the <code>-R</code> option is
followed by a directory name, rather than a file name, it is treated as
the <code>-rpath</code> option.

<a name="IDX72"></a>
<a name="IDX73"></a>
<a name="IDX74"></a>
</dd><dt><code>-s</code>
</dt><dd>
</dd><dt><code>--strip-all</code>
</dt><dd>
Omit all symbol information from the output file.

<a name="IDX75"></a>
<a name="IDX76"></a>
<a name="IDX77"></a>
</dd><dt><code>-S</code>
</dt><dd>
</dd><dt><code>--strip-debug</code>
</dt><dd>
Omit debugger symbol information (but not all symbols) from the output file.

<a name="IDX78"></a>
<a name="IDX79"></a>
<a name="IDX80"></a>
</dd><dt><code>-t</code>
</dt><dd>
</dd><dt><code>--trace</code>
</dt><dd>
Print the names of the input files as <code>ld</code> processes them.

<a name="IDX81"></a>
<a name="IDX82"></a>
<a name="IDX83"></a>
</dd><dt><code>-T <var>commandfile</var></code>
</dt><dd>
</dd><dt><code>--script=<var>commandfile</var></code>
</dt><dd>
Read link commands from the file <var>commandfile</var>.  These commands
replace <code>ld</code>'s default link script (rather than adding to it), so
<var>commandfile</var> must specify everything necessary to describe the
target format.  You must use this option if you want to use a command
which can only appear once in a linker script, such as the
<code>SECTIONS</code> or <code>MEMORY</code> command.  See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC5">Command Language</a>.  If
<var>commandfile</var> does not exist, <code>ld</code> looks for it in the
directories specified by any preceding <samp>`-L'</samp> options.  Multiple
<samp>`-T'</samp> options accumulate.

<a name="IDX84"></a>
<a name="IDX85"></a>
<a name="IDX86"></a>
</dd><dt><code>-u <var>symbol</var></code>
</dt><dd>
</dd><dt><code>--undefined=<var>symbol</var></code>
</dt><dd>
Force <var>symbol</var> to be entered in the output file as an undefined symbol.
Doing this may, for example, trigger linking of additional modules from
standard libraries.  <samp>`-u'</samp> may be repeated with different option
arguments to enter additional undefined symbols.

<a name="IDX87"></a>
<a name="IDX88"></a>
<a name="IDX89"></a>
<a name="IDX90"></a>
</dd><dt><code>-v</code>
</dt><dd>
</dd><dt><code>--version</code>
</dt><dd>
</dd><dt><code>-V</code>
</dt><dd>
Display the version number for <code>ld</code>.  The <code>-V</code> option also
lists the supported emulations.

<a name="IDX91"></a>
<a name="IDX92"></a>
<a name="IDX93"></a>
</dd><dt><code>-x</code>
</dt><dd>
</dd><dt><code>--discard-all</code>
</dt><dd>
Delete all local symbols.

<a name="IDX94"></a>
<a name="IDX95"></a>
<a name="IDX96"></a>
<a name="IDX97"></a>
</dd><dt><code>-X</code>
</dt><dd>
</dd><dt><code>--discard-locals</code>
</dt><dd>
Delete all temporary local symbols.  For most targets, this is all local
symbols whose names begin with <samp>`L'</samp>.

<a name="IDX98"></a>
<a name="IDX99"></a>
<a name="IDX100"></a>
</dd><dt><code>-y <var>symbol</var></code>
</dt><dd>
</dd><dt><code>--trace-symbol=<var>symbol</var></code>
</dt><dd>
Print the name of each linked file in which <var>symbol</var> appears.  This
option may be given any number of times.  On many systems it is necessary
to prepend an underscore.

This option is useful when you have an undefined symbol in your link but
don't know where the reference is coming from.

<a name="IDX101"></a>
</dd><dt><code>-Y <var>path</var></code>
</dt><dd>
Add <var>path</var> to the default library search path.  This option exists
for Solaris compatibility.

<a name="IDX102"></a>
</dd><dt><code>-z <var>keyword</var></code>
</dt><dd>
This option is ignored for Solaris compatibility.

<a name="IDX103"></a>
<a name="IDX104"></a>
</dd><dt><code>-( <var>archives</var> -)</code>
</dt><dd>
</dd><dt><code>--start-group <var>archives</var> --end-group</code>
</dt><dd>
The <var>archives</var> should be a list of archive files.  They may be
either explicit file names, or <samp>`-l'</samp> options.

The specified archives are searched repeatedly until no new undefined
references are created.  Normally, an archive is searched only once in
the order that it is specified on the command line.  If a symbol in that
archive is needed to resolve an undefined symbol referred to by an
object in an archive that appears later on the command line, the linker
would not be able to resolve that reference.  By grouping the archives,
they all be searched repeatedly until all possible references are
resolved.

Using this option has a significant performance cost.  It is best to use
it only when there are unavoidable circular references between two or
more archives.

<a name="IDX105"></a>
</dd><dt><code>-assert <var>keyword</var></code>
</dt><dd>
This option is ignored for SunOS compatibility.

<a name="IDX106"></a>
<a name="IDX107"></a>
<a name="IDX108"></a>
</dd><dt><code>-Bdynamic</code>
</dt><dd>
</dd><dt><code>-dy</code>
</dt><dd>
</dd><dt><code>-call_shared</code>
</dt><dd>
Link against dynamic libraries.  This is only meaningful on platforms
for which shared libraries are supported.  This option is normally the
default on such platforms.  The different variants of this option are
for compatibility with various systems.  You may use this option
multiple times on the command line: it affects library searching for
<code>-l</code> options which follow it.

<a name="IDX109"></a>
<a name="IDX110"></a>
<a name="IDX111"></a>
<a name="IDX112"></a>
</dd><dt><code>-Bstatic</code>
</dt><dd>
</dd><dt><code>-dn</code>
</dt><dd>
</dd><dt><code>-non_shared</code>
</dt><dd>
</dd><dt><code>-static</code>
</dt><dd>
Do not link against shared libraries.  This is only meaningful on
platforms for which shared libraries are supported.  The different
variants of this option are for compatibility with various systems.  You
may use this option multiple times on the command line: it affects
library searching for <code>-l</code> options which follow it.

<a name="IDX113"></a>
</dd><dt><code>-Bsymbolic</code>
</dt><dd>
When creating a shared library, bind references to global symbols to the
definition within the shared library, if any.  Normally, it is possible
for a program linked against a shared library to override the definition
within the shared library.  This option is only meaningful on ELF
platforms which support shared libraries.

<a name="IDX114"></a>
<a name="IDX115"></a>
</dd><dt><code>--cref</code>
</dt><dd>
Output a cross reference table.  If a linker map file is being
generated, the cross reference table is printed to the map file.
Otherwise, it is printed on the standard output.

The format of the table is intentionally simple, so that it may be
easily processed by a script if necessary.  The symbols are printed out,
sorted by name.  For each symbol, a list of file names is given.  If the
symbol is defined, the first file listed is the location of the
definition.  The remaining files contain references to the symbol.

<a name="IDX116"></a>
<a name="IDX117"></a>
</dd><dt><code>--defsym <var>symbol</var>=<var>expression</var></code>
</dt><dd>
Create a global symbol in the output file, containing the absolute
address given by <var>expression</var>.  You may use this option as many
times as necessary to define multiple symbols in the command line.  A
limited form of arithmetic is supported for the <var>expression</var> in this
context: you may give a hexadecimal constant or the name of an existing
symbol, or use <code>+</code> and <code>-</code> to add or subtract hexadecimal
constants or symbols.  If you need more elaborate expressions, consider
using the linker command language from a script (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC13">Assignment: Defining Symbols</a>).  <em>Note:</em>  there should be no
white space between <var>symbol</var>, the equals sign ("<kbd>=</kbd>"), and
<var>expression</var>.

<a name="IDX118"></a>
<a name="IDX119"></a>
</dd><dt><code>--dynamic-linker <var>file</var></code>
</dt><dd>
Set the name of the dynamic linker.  This is only meaningful when
generating dynamically linked ELF executables.  The default dynamic
linker is normally correct; don't use this unless you know what you are
doing.

<a name="IDX120"></a>
<a name="IDX121"></a>
<a name="IDX122"></a>
</dd><dt><code>-EB</code>
</dt><dd>
Link big-endian objects.  This affects the default output format.

<a name="IDX123"></a>
<a name="IDX124"></a>
</dd><dt><code>-EL</code>
</dt><dd>
Link little-endian objects.  This affects the default output format.

<a name="IDX125"></a>
<a name="IDX126"></a>
</dd><dt><code>--embedded-relocs</code>
</dt><dd>
This option is only meaningful when linking MIPS embedded PIC code,
generated by the -membedded-pic option to the GNU compiler and
assembler.  It causes the linker to create a table which may be used at
runtime to relocate any data which was statically initialized to pointer
values.  See the code in testsuite/ld-empic for details.

<a name="IDX127"></a>
<a name="IDX128"></a>
<a name="IDX129"></a>
</dd><dt><code>--help</code>
</dt><dd>
Print a summary of the command-line options on the standard output and exit.

<a name="IDX130"></a>
</dd><dt><code>-Map <var>mapfile</var></code>
</dt><dd>
Print a link map to the file <var>mapfile</var>.  See the description of the
<samp>`-M'</samp> option, above.

<a name="IDX131"></a>
<a name="IDX132"></a>
</dd><dt><code>--no-keep-memory</code>
</dt><dd>
<code>ld</code> normally optimizes for speed over memory usage by caching the
symbol tables of input files in memory.  This option tells <code>ld</code> to
instead optimize for memory usage, by rereading the symbol tables as
necessary.  This may be required if <code>ld</code> runs out of memory space
while linking a large executable.

<a name="IDX133"></a>
</dd><dt><code>--no-warn-mismatch</code>
</dt><dd>
Normally <code>ld</code> will give an error if you try to link together input
files that are mismatched for some reason, perhaps because they have
been compiled for different processors or for different endiannesses.
This option tells <code>ld</code> that it should silently permit such possible
errors.  This option should only be used with care, in cases when you
have taken some special action that ensures that the linker errors are
inappropriate.

<a name="IDX134"></a>
</dd><dt><code>--no-whole-archive</code>
</dt><dd>
Turn off the effect of the <code>--whole-archive</code> option for subsequent
archive files.

<a name="IDX135"></a>
<a name="IDX136"></a>
</dd><dt><code>--noinhibit-exec</code>
</dt><dd>
Retain the executable output file whenever it is still usable.
Normally, the linker will not produce an output file if it encounters
errors during the link process; it exits without writing an output file
when it issues any error whatsoever.

<a name="IDX137"></a>
</dd><dt><code>--oformat <var>output-format</var></code>
</dt><dd>
<code>ld</code> may be configured to support more than one kind of object
file.  If your <code>ld</code> is configured this way, you can use the
<samp>`--oformat'</samp> option to specify the binary format for the output
object file.  Even when <code>ld</code> is configured to support alternative
object formats, you don't usually need to specify this, as <code>ld</code>
should be configured to produce as a default output format the most
usual format on each machine.  <var>output-format</var> is a text string, the
name of a particular format supported by the BFD libraries.  (You can
list the available binary formats with <samp>`objdump -i'</samp>.)  The script
command <code>OUTPUT_FORMAT</code> can also specify the output format, but
this option overrides it.  See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC30">BFD</a>.

<a name="IDX138"></a>
</dd><dt><code>-qmagic</code>
</dt><dd>
This option is ignored for Linux compatibility.

<a name="IDX139"></a>
</dd><dt><code>-Qy</code>
</dt><dd>
This option is ignored for SVR4 compatibility.

<a name="IDX140"></a>
<a name="IDX141"></a>
<a name="IDX142"></a>
</dd><dt><code>--relax</code>
</dt><dd>
An option with machine dependent effects.  
This option is only supported on a few targets.
See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC28"><code>ld</code> and the H8/300</a>.
See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC29"><code>ld</code> and the Intel 960 family</a>.

On some platforms, the <samp>`--relax'</samp> option performs global
optimizations that become possible when the linker resolves addressing
in the program, such as relaxing address modes and synthesizing new
instructions in the output object file.

On platforms where this is not supported, <samp>`--relax'</samp> is accepted,
but ignored.

<a name="IDX143"></a>
<a name="IDX144"></a>
<a name="IDX145"></a>
</dd><dt><code>--retain-symbols-file <var>filename</var></code>
</dt><dd>
Retain <em>only</em> the symbols listed in the file <var>filename</var>,
discarding all others.  <var>filename</var> is simply a flat file, with one
symbol name per line.  This option is especially useful in environments
(such as VxWorks)
where a large global symbol table is accumulated gradually, to conserve
run-time memory.

<samp>`--retain-symbols-file'</samp> does <em>not</em> discard undefined symbols,
or symbols needed for relocations.

You may only specify <samp>`--retain-symbols-file'</samp> once in the command
line.  It overrides <samp>`-s'</samp> and <samp>`-S'</samp>.

</dd><dt><code>-rpath <var>dir</var></code>
</dt><dd>
<a name="IDX146"></a>
<a name="IDX147"></a>
Add a directory to the runtime library search path.  This is used when
linking an ELF executable with shared objects.  All <code>-rpath</code>
arguments are concatenated and passed to the runtime linker, which uses
them to locate shared objects at runtime.  The <code>-rpath</code> option is
also used when locating shared objects which are needed by shared
objects explicitly included in the link; see the description of the
<code>-rpath-link</code> option.  If <code>-rpath</code> is not used when linking an
ELF executable, the contents of the environment variable
<code>LD_RUN_PATH</code> will be used if it is defined.

The <code>-rpath</code> option may also be used on SunOS.  By default, on
SunOS, the linker will form a runtime search patch out of all the
<code>-L</code> options it is given.  If a <code>-rpath</code> option is used, the
runtime search path will be formed exclusively using the <code>-rpath</code>
options, ignoring the <code>-L</code> options.  This can be useful when using
gcc, which adds many <code>-L</code> options which may be on NFS mounted
filesystems.

For compatibility with other ELF linkers, if the <code>-R</code> option is
followed by a directory name, rather than a file name, it is treated as
the <code>-rpath</code> option.

<a name="IDX148"></a>
<a name="IDX149"></a>
</dd><dt><code>-rpath-link <var>DIR</var></code>
</dt><dd>
When using ELF or SunOS, one shared library may require another.  This
happens when an <code>ld -shared</code> link includes a shared library as one
of the input files.

When the linker encounters such a dependency when doing a non-shared,
non-relocateable link, it will automatically try to locate the required
shared library and include it in the link, if it is not included
explicitly.  In such a case, the <code>-rpath-link</code> option
specifies the first set of directories to search.  The
<code>-rpath-link</code> option may specify a sequence of directory names
either by specifying a list of names separated by colons, or by
appearing multiple times.

The linker uses the following search paths to locate required shared
libraries.

<ol>
<li>

Any directories specified by <code>-rpath-link</code> options.
</li><li>

Any directories specified by <code>-rpath</code> options.  The difference
between <code>-rpath</code> and <code>-rpath-link</code> is that directories
specified by <code>-rpath</code> options are included in the executable and
used at runtime, whereas the <code>-rpath-link</code> option is only effective
at link time.
</li><li>

On an ELF system, if the <code>-rpath</code> and <code>rpath-link</code> options
were not used, search the contents of the environment variable
<code>LD_RUN_PATH</code>.
</li><li>

On SunOS, if the <code>-rpath</code> option was not used, search any
directories specified using <code>-L</code> options.
</li><li>

For a native linker, the contents of the environment variable
<code>LD_LIBRARY_PATH</code>.
</li><li>

The default directories, normally <tt>`/lib'</tt> and <tt>`/usr/lib'</tt>.
</li></ol>

If the required shared library is not found, the linker will issue a
warning and continue with the link.

<a name="IDX150"></a>
<a name="IDX151"></a>
</dd><dt><code>-shared</code>
</dt><dd>
</dd><dt><code>-Bshareable</code>
</dt><dd>
<a name="IDX152"></a>
Create a shared library.  This is currently only supported on ELF, XCOFF
and SunOS platforms.  On SunOS, the linker will automatically create a
shared library if the <code>-e</code> option is not used and there are
undefined symbols in the link.

</dd><dt><code>--sort-common</code>
</dt><dd>
<a name="IDX153"></a>
This option tells <code>ld</code> to sort the common symbols by size when it
places them in the appropriate output sections.  First come all the one
byte symbols, then all the two bytes, then all the four bytes, and then
everything else.  This is to prevent gaps between symbols due to
alignment constraints.

<a name="IDX154"></a>
</dd><dt><code>--split-by-file</code>
</dt><dd>
Similar to <code>--split-by-reloc</code> but creates a new output section for
each input file.

<a name="IDX155"></a>
</dd><dt><code>--split-by-reloc <var>count</var></code>
</dt><dd>
Trys to creates extra sections in the output file so that no single
output section in the file contains more than <var>count</var> relocations.
This is useful when generating huge relocatable for downloading into
certain real time kernels with the COFF object file format; since COFF
cannot represent more than 65535 relocations in a single section.  Note
that this will fail to work with object file formats which do not
support arbitrary sections.  The linker will not split up individual
input sections for redistribution, so if a single input section contains
more than <var>count</var> relocations one output section will contain that
many relocations.

<a name="IDX156"></a>
</dd><dt><code>--stats</code>
</dt><dd>
Compute and display statistics about the operation of the linker, such
as execution time and memory usage.

<a name="IDX157"></a>
<a name="IDX158"></a>
</dd><dt><code>--traditional-format</code>
</dt><dd>
For some targets, the output of <code>ld</code> is different in some ways from
the output of some existing linker.  This switch requests <code>ld</code> to
use the traditional format instead.

<a name="IDX159"></a>
For example, on SunOS, <code>ld</code> combines duplicate entries in the
symbol string table.  This can reduce the size of an output file with
full debugging information by over 30 percent.  Unfortunately, the SunOS
<code>dbx</code> program can not read the resulting program (<code>gdb</code> has no
trouble).  The <samp>`--traditional-format'</samp> switch tells <code>ld</code> to not
combine duplicate entries.

<a name="IDX160"></a>
<a name="IDX161"></a>
<a name="IDX162"></a>
<a name="IDX163"></a>
</dd><dt><code>-Tbss <var>org</var></code>
</dt><dd>
</dd><dt><code>-Tdata <var>org</var></code>
</dt><dd>
</dd><dt><code>-Ttext <var>org</var></code>
</dt><dd>
Use <var>org</var> as the starting address for--respectively--the
<code>bss</code>, <code>data</code>, or the <code>text</code> segment of the output file.
<var>org</var> must be a single hexadecimal integer;
for compatibility with other linkers, you may omit the leading
<samp>`0x'</samp> usually associated with hexadecimal values.

<a name="IDX164"></a>
<a name="IDX165"></a>
</dd><dt><code>-Ur</code>
</dt><dd>
For anything other than C++ programs, this option is equivalent to
<samp>`-r'</samp>: it generates relocatable output--i.e., an output file that can in
turn serve as input to <code>ld</code>.  When linking C++ programs, <samp>`-Ur'</samp>
<em>does</em> resolve references to constructors, unlike <samp>`-r'</samp>.
It does not work to use <samp>`-Ur'</samp> on files that were themselves linked
with <samp>`-Ur'</samp>; once the constructor table has been built, it cannot
be added to.  Use <samp>`-Ur'</samp> only for the last partial link, and
<samp>`-r'</samp> for the others.

<a name="IDX166"></a>
<a name="IDX167"></a>
</dd><dt><code>--verbose</code>
</dt><dd>
Display the version number for <code>ld</code> and list the linker emulations
supported.  Display which input files can and cannot be opened.  Display
the linker script if using a default builtin script.

<a name="IDX168"></a>
<a name="IDX169"></a>
</dd><dt><code>--version-script=<var>version-scriptfile</var></code>
</dt><dd>
Specify the name of a version script to the linker.  This is typically
used when creating shared libraries to specify additional information
about the version heirarchy for the library being created.  This option
is only meaningful on ELF platforms which support shared libraries.
See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC25">Version Script</a>.

<a name="IDX170"></a>
<a name="IDX171"></a>
<a name="IDX172"></a>
</dd><dt><code>--warn-common</code>
</dt><dd>
Warn when a common symbol is combined with another common symbol or with
a symbol definition.  Unix linkers allow this somewhat sloppy practice,
but linkers on some other operating systems do not.  This option allows
you to find potential problems from combining global symbols.
Unfortunately, some C libraries use this practice, so you may get some
warnings about symbols in the libraries as well as in your programs.

There are three kinds of global symbols, illustrated here by C examples:

<dl compact="">

<dt><samp>`int i = 1;'</samp>
</dt><dd>
A definition, which goes in the initialized data section of the output
file.

</dd><dt><samp>`extern int i;'</samp>
</dt><dd>
An undefined reference, which does not allocate space.
There must be either a definition or a common symbol for the
variable somewhere.

</dd><dt><samp>`int i;'</samp>
</dt><dd>
A common symbol.  If there are only (one or more) common symbols for a
variable, it goes in the uninitialized data area of the output file.
The linker merges multiple common symbols for the same variable into a
single symbol.  If they are of different sizes, it picks the largest
size.  The linker turns a common symbol into a declaration, if there is
a definition of the same variable.
</dd></dl>

The <samp>`--warn-common'</samp> option can produce five kinds of warnings.
Each warning consists of a pair of lines: the first describes the symbol
just encountered, and the second describes the previous symbol
encountered with the same name.  One or both of the two symbols will be
a common symbol.


<ol>
<li>

Turning a common symbol into a reference, because there is already a
definition for the symbol.

<pre><var>file</var>(<var>section</var>): warning: common of `<var>symbol</var>'
   overridden by definition
<var>file</var>(<var>section</var>): warning: defined here
</pre>

</li><li>

Turning a common symbol into a reference, because a later definition for
the symbol is encountered.  This is the same as the previous case,
except that the symbols are encountered in a different order.

<pre><var>file</var>(<var>section</var>): warning: definition of `<var>symbol</var>'
   overriding common
<var>file</var>(<var>section</var>): warning: common is here
</pre>

</li><li>

Merging a common symbol with a previous same-sized common symbol.

<pre><var>file</var>(<var>section</var>): warning: multiple common
   of `<var>symbol</var>'
<var>file</var>(<var>section</var>): warning: previous common is here
</pre>

</li><li>

Merging a common symbol with a previous larger common symbol.

<pre><var>file</var>(<var>section</var>): warning: common of `<var>symbol</var>'
   overridden by larger common
<var>file</var>(<var>section</var>): warning: larger common is here
</pre>

</li><li>

Merging a common symbol with a previous smaller common symbol.  This is
the same as the previous case, except that the symbols are
encountered in a different order.

<pre><var>file</var>(<var>section</var>): warning: common of `<var>symbol</var>'
   overriding smaller common
<var>file</var>(<var>section</var>): warning: smaller common is here
</pre>

</li></ol>

<a name="IDX173"></a>
</dd><dt><code>--warn-constructors</code>
</dt><dd>
Warn if any global constructors are used.  This is only useful for a few
object file formats.  For formats like COFF or ELF, the linker can not
detect the use of global constructors.

<a name="IDX174"></a>
</dd><dt><code>--warn-multiple-gp</code>
</dt><dd>
Warn if multiple global pointer values are required in the output file.
This is only meaningful for certain processors, such as the Alpha.
Specifically, some processors put large-valued constants in a special
section.  A special register (the global pointer) points into the middle
of this section, so that constants can be loaded efficiently via a
base-register relative addressing mode.  Since the offset in
base-register relative mode is fixed and relatively small (e.g., 16
bits), this limits the maximum size of the constant pool.  Thus, in
large programs, it is often necessary to use multiple global pointer
values in order to be able to address all possible constants.  This
option causes a warning to be issued whenever this case occurs.

<a name="IDX175"></a>
<a name="IDX176"></a>
<a name="IDX177"></a>
</dd><dt><code>--warn-once</code>
</dt><dd>
Only warn once for each undefined symbol, rather than once per module
which refers to it.

<a name="IDX178"></a>
<a name="IDX179"></a>
<a name="IDX180"></a>
</dd><dt><code>--warn-section-align</code>
</dt><dd>
Warn if the address of an output section is changed because of
alignment.  Typically, the alignment will be set by an input section.
The address will only be changed if it not explicitly specified; that
is, if the <code>SECTIONS</code> command does not specify a start address for
the section (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC17">Specifying Output Sections</a>).

<a name="IDX181"></a>
<a name="IDX182"></a>
</dd><dt><code>--whole-archive</code>
</dt><dd>
For each archive mentioned on the command line after the
<code>--whole-archive</code> option, include every object file in the archive
in the link, rather than searching the archive for the required object
files.  This is normally used to turn an archive file into a shared
library, forcing every object to be included in the resulting shared
library.  This option may be used more than once.

<a name="IDX183"></a>
</dd><dt><code>--wrap <var>symbol</var></code>
</dt><dd>
Use a wrapper function for <var>symbol</var>.  Any undefined reference to
<var>symbol</var> will be resolved to <code>__wrap_<var>symbol</var></code>.  Any
undefined reference to <code>__real_<var>symbol</var></code> will be resolved to
<var>symbol</var>.

This can be used to provide a wrapper for a system function.  The
wrapper function should be called <code>__wrap_<var>symbol</var></code>.  If it
wishes to call the system function, it should call
<code>__real_<var>symbol</var></code>.

Here is a trivial example:


<pre>void *
__wrap_malloc (int c)
{
  printf ("malloc called with %ld\n", c);
  return __real_malloc (c);
}
</pre>

If you link other code with this file using <code>--wrap malloc</code>, then
all calls to <code>malloc</code> will call the function <code>__wrap_malloc</code>
instead.  The call to <code>__real_malloc</code> in <code>__wrap_malloc</code> will
call the real <code>malloc</code> function.

You may wish to provide a <code>__real_malloc</code> function as well, so that
links without the <code>--wrap</code> option will succeed.  If you do this,
you should not put the definition of <code>__real_malloc</code> in the same
file as <code>__wrap_malloc</code>; if you do, the assembler may resolve the
call before the linker has a chance to wrap it to <code>malloc</code>.

</dd></dl>



<h2><a name="SEC4" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC4">Environment Variables</a></h2>

<p>
You can change the behavior of <code>ld</code> with the environment variables
<code>GNUTARGET</code> and <code>LDEMULATION</code>.

</p>
<p>
<a name="IDX184"></a>
<a name="IDX185"></a>
<code>GNUTARGET</code> determines the input-file object format if you don't
use <samp>`-b'</samp> (or its synonym <samp>`--format'</samp>).  Its value should be one
of the BFD names for an input format (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC30">BFD</a>).  If there is no
<code>GNUTARGET</code> in the environment, <code>ld</code> uses the natural format
of the target. If <code>GNUTARGET</code> is set to <code>default</code> then BFD
attempts to discover the input format by examining binary input files;
this method often succeeds, but there are potential ambiguities, since
there is no method of ensuring that the magic number used to specify
object-file formats is unique.  However, the configuration procedure for
BFD on each system places the conventional format for that system first
in the search-list, so ambiguities are resolved in favor of convention.

</p>
<p>
<a name="IDX186"></a>
<a name="IDX187"></a>
<a name="IDX188"></a>
<code>LDEMULATION</code> determines the default emulation if you don't use the
<samp>`-m'</samp> option.  The emulation can affect various aspects of linker
behaviour, particularly the default linker script.  You can list the
available emulations with the <samp>`--verbose'</samp> or <samp>`-V'</samp> options.  If
the <samp>`-m'</samp> option is not used, and the <code>LDEMULATION</code> environment
variable is not defined, the default emulation depends upon how the
linker was configured.

</p>


<h1><a name="SEC5" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC5">Command Language</a></h1>

<p>
<a name="IDX189"></a>
The command language provides explicit control over the link process,
allowing complete specification of the mapping between the linker's
input files and its output.  It controls:

</p><ul>
<li>

input files 
</li><li>

file formats
</li><li>

output file layout
</li><li>

addresses of sections
</li><li>

placement of common blocks
</li></ul>

<p>
You may supply a command file (also known as a linker script) to the
linker either explicitly through the <samp>`-T'</samp> option, or implicitly as
an ordinary file.  Normally you should use the <samp>`-T'</samp> option.  An
implicit linker script should only be used when you want to augment,
rather than replace, the default linker script; typically an implicit
linker script would consist only of <code>INPUT</code> or <code>GROUP</code>
commands.

</p>
<p>
If the linker opens a file which it cannot recognize as a supported
object or archive format, nor as a linker script, it reports an error.

</p>



<h2><a name="SEC6" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC6">Linker Scripts</a></h2>
<p>
The <code>ld</code> command language is a collection of statements; some are
simple keywords setting a particular option, some are used to select and
group input files or name output files; and two statement
types have a fundamental and pervasive impact on the linking process.

</p>
<p>
<a name="IDX190"></a>
<a name="IDX191"></a>
<a name="IDX192"></a>
<a name="IDX193"></a>
The most fundamental command of the <code>ld</code> command language is the
<code>SECTIONS</code> command (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC17">Specifying Output Sections</a>).  Every meaningful command
script must have a <code>SECTIONS</code> command: it specifies a
"picture" of the output file's layout, in varying degrees of detail.
No other command is required in all cases.

</p>
<p>
The <code>MEMORY</code> command complements <code>SECTIONS</code> by describing the
available memory in the target architecture.  This command is optional;
if you don't use a <code>MEMORY</code> command, <code>ld</code> assumes sufficient
memory is available in a contiguous block for all output.
See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC16">Memory Layout</a>.

</p>
<p>
<a name="IDX194"></a>
You may include comments in linker scripts just as in C: delimited
by <samp>`/*'</samp> and <samp>`*/'</samp>.  As in C, comments are syntactically
equivalent to whitespace.

</p>


<h2><a name="SEC7" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC7">Expressions</a></h2>
<p>
<a name="IDX195"></a>
<a name="IDX196"></a>
Many useful commands involve arithmetic expressions.  The syntax for
expressions in the command language is identical to that of C
expressions, with the following features:

</p><ul>
<li>

All expressions evaluated as integers and
are of "long" or "unsigned long" type.
</li><li>

All constants are integers.
</li><li>

All of the C arithmetic operators are provided.
</li><li>

You may reference, define, and create global variables.
</li><li>

You may call special purpose built-in functions.
</li></ul>



<h3><a name="SEC8" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC8">Integers</a></h3>
<p>
<a name="IDX197"></a>
<a name="IDX198"></a>
An octal integer is <samp>`0'</samp> followed by zero or more of the octal
digits (<samp>`01234567'</samp>).

</p><pre>_as_octal = 0157255;
</pre>

<p>
<a name="IDX199"></a>
A decimal integer starts with a non-zero digit followed by zero or
more digits (<samp>`0123456789'</samp>).

</p><pre>_as_decimal = 57005;
</pre>

<p>
<a name="IDX200"></a>
<a name="IDX201"></a>
A hexadecimal integer is <samp>`0x'</samp> or <samp>`0X'</samp> followed by one or
more hexadecimal digits chosen from <samp>`0123456789abcdefABCDEF'</samp>.

</p><pre>_as_hex = 0xdead;
</pre>

<p>
<a name="IDX202"></a>
To write a negative integer, use
the prefix operator <samp>`-'</samp> (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC11">Operators</a>).

</p><pre>_as_neg = -57005;
</pre>

<p>
<a name="IDX203"></a>
<a name="IDX204"></a>
<a name="IDX205"></a>
<a name="IDX206"></a>
<a name="IDX207"></a>
Additionally the suffixes <code>K</code> and <code>M</code> may be used to scale a
constant by 
respectively. For example, the following all refer to the same quantity:

</p>

<pre>        _fourk_1 = 4K;
        _fourk_2 = 4096;
        _fourk_3 = 0x1000;
</pre>



<h3><a name="SEC9" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC9">Symbol Names</a></h3>
<p>
<a name="IDX208"></a>
<a name="IDX209"></a>
<a name="IDX210"></a>
<a name="IDX211"></a>
Unless quoted, symbol names start with a letter, underscore, or point
and may include any letters, underscores, digits, points,
and hyphens.  Unquoted symbol names must not conflict with any
keywords.  You can specify a symbol which contains odd characters or has
the same name as a keyword, by surrounding the symbol name in double quotes:

</p><pre>        "SECTION" = 9;
        "with a space" = "also with a space" + 10;
</pre>

<p>
Since symbols can contain many non-alphabetic characters, it is safest
to delimit symbols with spaces.  For example, <samp>`A-B'</samp> is one symbol,
whereas <samp>`A - B'</samp> is an expression involving subtraction.

</p>


<h3><a name="SEC10" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC10">The Location Counter</a></h3>
<p>
<a name="IDX212"></a>
<a name="IDX213"></a>
<a name="IDX214"></a>
<a name="IDX215"></a>
The special linker variable <em>dot</em> <samp>`.'</samp> always contains the
current output location counter. Since the <code>.</code> always refers to
a location in an output section, it must always appear in an
expression within a <code>SECTIONS</code> command. The <code>.</code> symbol
may appear anywhere that an ordinary symbol is allowed in an
expression, but its assignments have a side effect. Assigning a value
to the <code>.</code> symbol will cause the location counter to be moved.
<a name="IDX216"></a>
This may be used to create holes in the output section.  The location
counter may never be moved backwards.

</p><pre>SECTIONS
{
  output :
  {
  file1(.text)
  . = . + 1000;
  file2(.text)
  . += 1000;
  file3(.text)
  } = 0x1234;
}
</pre>

<p>
In the previous example, <code>file1</code> is located at the beginning of the
output section, then there is a 1000 byte gap.  Then <code>file2</code>
appears, also with a 1000 byte gap following before <code>file3</code> is
loaded.  The notation <samp>`= 0x1234'</samp> specifies what data to write in
the gaps (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC21">Optional Section Attributes</a>).

</p>
<p>
@vfill

</p>


<h3><a name="SEC11" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC11">Operators</a></h3>
<p>
<a name="IDX217"></a>
<a name="IDX218"></a>
<a name="IDX219"></a>
The linker recognizes  the standard C set of arithmetic operators, with
the standard bindings and precedence levels:
{
@obeylines@parskip=0pt@parindent=0pt
@dag@quad Prefix operators.
@ddag@quad See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC13">Assignment: Defining Symbols</a>.
}

</p>


<h3><a name="SEC12" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC12">Evaluation</a></h3>

<p>
<a name="IDX220"></a>
<a name="IDX221"></a>
The linker uses "lazy evaluation" for expressions; it only calculates
an expression when absolutely necessary.  The linker needs the value of
the start address, and the lengths of memory regions, in order to do any
linking at all; these values are computed as soon as possible when the
linker reads in the command file.  However, other values (such as symbol
values) are not known or needed until after storage allocation.  Such
values are evaluated later, when other information (such as the sizes of
output sections) is available for use in the symbol assignment
expression.

</p>


<h3><a name="SEC13" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC13">Assignment: Defining Symbols</a></h3>
<p>
<a name="IDX222"></a>
<a name="IDX223"></a>
<a name="IDX224"></a>
You may create global symbols, and assign values (addresses) to global
symbols, using any of the C assignment operators:

</p>
<dl compact="">

<dt><code><var>symbol</var>  = <var>expression</var> ;</code>
</dt><dd>
</dd><dt><code><var>symbol</var> &amp;= <var>expression</var> ;</code>
</dt><dd>
</dd><dt><code><var>symbol</var> += <var>expression</var> ;</code>
</dt><dd>
</dd><dt><code><var>symbol</var> -= <var>expression</var> ;</code>
</dt><dd>
</dd><dt><code><var>symbol</var> *= <var>expression</var> ;</code>
</dt><dd>
</dd><dt><code><var>symbol</var> /= <var>expression</var> ;</code>
</dt><dd>
</dd></dl>

<p>
Two things distinguish assignment from other operators in <code>ld</code>
expressions.

</p><ul>
<li>

Assignment may only be used at the root of an expression;
<samp>`a=b+3;'</samp> is allowed, but <samp>`a+b=3;'</samp> is an error.

<a name="IDX225"></a>
<a name="IDX226"></a>
</li><li>

You must place a trailing semicolon ("<kbd>;</kbd>") at the end of an
assignment statement.
</li></ul>

<p>
Assignment statements may appear:

</p><ul>
<li>

as commands in their own right in an <code>ld</code> script; or
</li><li>

as independent statements within a <code>SECTIONS</code> command; or
</li><li>

as part of the contents of a section definition in a
<code>SECTIONS</code> command.
</li></ul>

<p>
The first two cases are equivalent in effect--both define a symbol with
an absolute address.  The last case defines a symbol whose address is
relative to a particular section (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC17">Specifying Output Sections</a>).

</p>
<p>
<a name="IDX227"></a>
<a name="IDX228"></a>
<a name="IDX229"></a>
When a linker expression is evaluated and assigned to a variable, it is
given either an absolute or a relocatable type. An absolute expression
type is one in which the symbol contains the value that it will have in
the output file; a relocatable expression type is one in which the
value is expressed as a fixed offset from the base of a section.

</p>
<p>
The type of the expression is controlled by its position in the script
file.  A symbol assigned within a section definition is created relative
to the base of the section; a symbol assigned in any other place is
created as an absolute symbol. Since a symbol created within a
section definition is relative to the base of the section, it
will remain relocatable if relocatable output is requested.  A symbol
may be created with an absolute value even when assigned to within a
section definition by using the absolute assignment function
<code>ABSOLUTE</code>.  For example, to create an absolute symbol whose address
is the last byte of an output section named <code>.data</code>:

</p><pre>SECTIONS{ ...
  .data : 
    {
      *(.data)
      _edata = ABSOLUTE(.) ;
    } 
... }
</pre>

<p>
The linker tries to put off the evaluation of an assignment until all
the terms in the source expression are known (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC12">Evaluation</a>).  For
instance, the sizes of sections cannot be known until after allocation,
so assignments dependent upon these are not performed until after
allocation. Some expressions, such as those depending upon the location
counter <em>dot</em>, <samp>`.'</samp> must be evaluated during allocation. If the
result of an expression is required, but the value is not available,
then an error results.  For example, a script like the following

</p><pre>SECTIONS { ...
  text 9+this_isnt_constant : 
    { ...
    }
... }
</pre>

<p>
<a name="IDX230"></a>
will cause the error message "<code>Non constant expression for initial
address</code>".

</p>
<p>
<a name="IDX231"></a>
In some cases, it is desirable for a linker script to define a symbol
only if it is referenced, and only if it is not defined by any object
included in the link.  For example, traditional linkers defined the
symbol <samp>`etext'</samp>.  However, ANSI C requires that the user be able to
use <samp>`etext'</samp> as a function name without encountering an error.
The <code>PROVIDE</code> keyword may be used to define a symbol, such as
<samp>`etext'</samp>, only if it is referenced but not defined.  The syntax is
<code>PROVIDE(<var>symbol</var> = <var>expression</var>)</code>.

</p>


<h3><a name="SEC14" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC14">Arithmetic Functions</a></h3>
<p>
<a name="IDX232"></a>
The command language includes a number of built-in
functions for use in link script expressions.
</p><dl compact="">

<dt><code>ABSOLUTE(<var>exp</var>)</code>
</dt><dd>
<a name="IDX233"></a>
 <a name="IDX234"></a>
 
Return the absolute (non-relocatable, as opposed to non-negative) value
of the expression <var>exp</var>.  Primarily useful to assign an absolute
value to a symbol within a section definition, where symbol values are
normally section-relative.

<a name="IDX235"></a>
<a name="IDX236"></a>
</dd><dt><code>ADDR(<var>section</var>)</code>
</dt><dd>
Return the absolute address of the named <var>section</var>.  Your script must
previously have defined the location of that section. In the following
example, <code>symbol_1</code> and <code>symbol_2</code> are assigned identical
values:

<pre>SECTIONS{ ...
  .output1 :
    { 
    start_of_output_1 = ABSOLUTE(.);
    ...
    }
  .output :
    {
    symbol_1 = ADDR(.output1);
    symbol_2 = start_of_output_1;
    }
... }
</pre>

<a name="IDX237"></a>
<a name="IDX238"></a>
</dd><dt><code>LOADADDR(<var>section</var>)</code>
</dt><dd>
Return the absolute load address of the named <var>section</var>.  This is
normally the same as <code>ADDR</code>, but it may be different if the
<code>AT</code> keyword is used in the section definition (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC21">Optional Section Attributes</a>).

<a name="IDX239"></a>
<a name="IDX240"></a>
</dd><dt><code>ALIGN(<var>exp</var>)</code>
</dt><dd>
Return the result of the current location counter (<code>.</code>) aligned to
the next <var>exp</var> boundary.  <var>exp</var> must be an expression whose
value is a power of two.  This is equivalent to 

<pre>(. + <var>exp</var> - 1) &amp; ~(<var>exp</var> - 1)
</pre>

<code>ALIGN</code> doesn't change the value of the location counter--it just
does arithmetic on it.  As an example, to align the output <code>.data</code>
section to the next <code>0x2000</code> byte boundary after the preceding
section and to set a variable within the section to the next
<code>0x8000</code> boundary after the input sections:

<pre>SECTIONS{ ...
  .data ALIGN(0x2000): {
    *(.data)
    variable = ALIGN(0x8000);
  }
... }
</pre>

The first use of <code>ALIGN</code> in this example specifies the location of
a section because it is used as the optional <var>start</var> attribute of a
section definition (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC21">Optional Section Attributes</a>).  The second use simply
defines the value of a variable.

The built-in <code>NEXT</code> is closely related to <code>ALIGN</code>.

<a name="IDX241"></a>
<a name="IDX242"></a>
</dd><dt><code>DEFINED(<var>symbol</var>)</code>
</dt><dd>
Return 1 if <var>symbol</var> is in the linker global symbol table and is
defined, otherwise return 0.  You can use this function to provide default
values for symbols.  For example, the following command-file fragment shows how
to set a global symbol <code>begin</code> to the first location in the
<code>.text</code> section--but if a symbol called <code>begin</code> already
existed, its value is preserved:


<pre>SECTIONS{ ...
  .text : {
    begin = DEFINED(begin) ? begin : . ;
    ...
  }
... }
</pre>

<a name="IDX243"></a>
<a name="IDX244"></a>
</dd><dt><code>NEXT(<var>exp</var>)</code>
</dt><dd>
Return the next unallocated address that is a multiple of <var>exp</var>.
This function is closely related to <code>ALIGN(<var>exp</var>)</code>; unless you
use the <code>MEMORY</code> command to define discontinuous memory for the
output file, the two functions are equivalent.

<a name="IDX245"></a>
<a name="IDX246"></a>
</dd><dt><code>SIZEOF(<var>section</var>)</code>
</dt><dd>
Return the size in bytes of the named <var>section</var>, if that section has
been allocated.  In the following example, <code>symbol_1</code> and
<code>symbol_2</code> are assigned identical values:

<pre>SECTIONS{ ...
  .output {
    .start = . ;
    ...
    .end = . ;
    }
  symbol_1 = .end - .start ;
  symbol_2 = SIZEOF(.output);
... }
</pre>

<a name="IDX247"></a>
<a name="IDX248"></a>
<a name="IDX249"></a>
</dd><dt><code>SIZEOF_HEADERS</code>
</dt><dd>
</dd><dt><code>sizeof_headers</code>
</dt><dd>
Return the size in bytes of the output file's headers.  You can use this number
as the start address of the first section, if you choose, to facilitate
paging. 

<a name="IDX250"></a>
</dd><dt><code>MAX(<var>exp1</var>, <var>exp2</var>)</code>
</dt><dd>
Returns the maximum of <var>exp1</var> and <var>exp2</var>.

<a name="IDX251"></a>
</dd><dt><code>MIN(<var>exp1</var>, <var>exp2</var>)</code>
</dt><dd>
Returns the minimum of <var>exp1</var> and <var>exp2</var>.

</dd></dl>



<h3><a name="SEC15" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC15">Semicolons</a></h3>

<p>
Semicolons ("<kbd>;</kbd>") are required in the following places.  In all
other places they can appear for aesthetic reasons but are otherwise ignored.

</p>
<dl compact="">

<dt><code>Assignment</code>
</dt><dd>
Semicolons must appear at the end of assignment expressions.
See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC13">Assignment: Defining Symbols</a>

</dd><dt><code>PHDRS</code>
</dt><dd>
Semicolons must appear at the end of a <code>PHDRS</code> statement.
See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC23">ELF Program Headers</a>
</dd></dl>



<h2><a name="SEC16" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC16">Memory Layout</a></h2>
<p>
<a name="IDX252"></a>
<a name="IDX253"></a>
<a name="IDX254"></a>
<a name="IDX255"></a>
The linker's default configuration permits allocation of all available memory.
You can override this configuration by using the <code>MEMORY</code> command.  The
<code>MEMORY</code> command describes the location and size of blocks of
memory in the target.  By using it carefully, you can describe which
memory regions may be used by the linker, and which memory regions it
must avoid.  The linker does not shuffle sections to fit into the
available regions, but does move the requested sections into the correct
regions and issue errors when the regions become too full.  

</p>
<p>
A command file may contain at most one use of the <code>MEMORY</code>
command; however, you can define as many blocks of memory within it as
you wish.  The syntax is:
        

</p><pre>MEMORY 
  {
    <var>name</var> (<var>attr</var>) : ORIGIN = <var>origin</var>, LENGTH = <var>len</var>
    ...
  }
</pre>

<dl compact="">

<dt><code><var>name</var></code>
</dt><dd>
<a name="IDX256"></a>
 
is a name used internally by the linker to refer to the region. Any
symbol name may be used.  The region names are stored in a separate
name space, and will not conflict with symbols, file names or section
names.  Use distinct names to specify multiple regions.

<a name="IDX257"></a>
</dd><dt><code>(<var>attr</var>)</code>
</dt><dd>
is an optional list of attributes that specify whether to use a
particular memory to place sections that are not listed in the linker
script.  Valid attribute lists must be made up of the characters
"<code>ALIRWX</code>" that match section attributes.  If you omit the
attribute list, you may omit the parentheses around it as well.  The
attributes currently supported are:

<dl compact="">

<dt><samp>`<code>Letter</code>'</samp>
</dt><dd>
<code>Section Attribute</code>

</dd><dt><samp>`<code>R</code>'</samp>
</dt><dd>
Read-only sections.

</dd><dt><samp>`<code>W</code>'</samp>
</dt><dd>
Read/write sections.

</dd><dt><samp>`<code>X</code>'</samp>
</dt><dd>
Sections containing executable code.

</dd><dt><samp>`<code>A</code>'</samp>
</dt><dd>
Allocated sections.

</dd><dt><samp>`<code>I</code>'</samp>
</dt><dd>
Initialized sections.

</dd><dt><samp>`<code>L</code>'</samp>
</dt><dd>
Same as <code>I</code>.

</dd><dt><samp>`<code>!</code>'</samp>
</dt><dd>
Invert the sense of any of the following attributes.
</dd></dl>

<a name="IDX258"></a>
<a name="IDX259"></a>
<a name="IDX260"></a>
</dd><dt><code><var>origin</var></code>
</dt><dd>
is the start address of the region in physical memory.  It is
an expression that must evaluate to a constant before
memory allocation is performed. The keyword <code>ORIGIN</code> may be
abbreviated to <code>org</code> or <code>o</code> (but not, for example, <samp>`ORG'</samp>).

<a name="IDX261"></a>
<a name="IDX262"></a>
<a name="IDX263"></a>
</dd><dt><code><var>len</var></code>
</dt><dd>
is the size in bytes of the region (an expression).
The keyword <code>LENGTH</code> may be abbreviated to <code>len</code> or <code>l</code>.
</dd></dl>

<p>
For example, to specify that memory has two regions available for
allocation--one starting at 0 for 256 kilobytes, and the other starting
at <code>0x40000000</code> for four megabytes.  The <code>rom</code> memory region
will get all sections without an explicit memory register that are
either read-only or contain code, while the <code>ram</code> memory region
will get the sections.

</p>

<pre>MEMORY 
  {
  rom (rx)  : ORIGIN = 0, LENGTH = 256K
  ram (!rx) : org = 0x40000000, l = 4M
  }
</pre>

<p>
Once you have defined a region of memory named <var>mem</var>, you can direct
specific output sections there by using a command ending in
<samp>`&gt;<var>mem</var>'</samp> within the <code>SECTIONS</code> command (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC21">Optional Section Attributes</a>).  If the combined output sections directed to a region are too
big for the region, the linker will issue an error message.

</p>


<h2><a name="SEC17" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC17">Specifying Output Sections</a></h2>

<p>
<a name="IDX264"></a>
The <code>SECTIONS</code> command controls exactly where input sections are
placed into output sections, their order in the output file, and to
which output sections they are allocated.

</p>
<p>
You may use at most one <code>SECTIONS</code> command in a script file,
but you can have as many statements within it as you wish.  Statements
within the <code>SECTIONS</code> command can do one of three things:

</p>

<ul>
<li>

define the entry point;

</li><li>

assign a value to a symbol;

</li><li>

describe the placement of a named output section, and which input
sections go into it.
</li></ul>

<p>
You can also use the first two operations--defining the entry point and
defining symbols--outside the <code>SECTIONS</code> command: see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC24">The Entry Point</a>, and section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC13">Assignment: Defining Symbols</a>.  They are permitted here as well for
your convenience in reading the script, so that symbols and the entry
point can be defined at meaningful points in your output-file layout.

</p>
<p>
If you do not use a <code>SECTIONS</code> command, the linker places each input
section into an identically named output section in the order that the
sections are first encountered in the input files.  If all input sections
are present in the first file, for example, the order of sections in the
output file will match the order in the first input file.

</p>



<h3><a name="SEC18" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC18">Section Definitions</a></h3>
<p>
<a name="IDX265"></a>
The most frequently used statement in the <code>SECTIONS</code> command is
the <em>section definition</em>, which specifies the
properties of an output section: its location, alignment, contents,
fill pattern, and target memory region.  Most of
these specifications are optional; the simplest form of a section
definition is

</p><pre>SECTIONS { ...
  <var>secname</var> : {
    <var>contents</var>
  }
... }
</pre>

<p>
<a name="IDX266"></a>
<var>secname</var> is the name of the output section, and <var>contents</var> a
specification of what goes there--for example, a list of input files or
sections of input files (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC19">Section Placement</a>).  The whitespace
around <var>secname</var> is required, so that the section name is
unambiguous.  The other whitespace shown is optional.  You do need the
colon <samp>`:'</samp> and the braces <samp>`{}'</samp>, however.

</p>
<p>
<var>secname</var> must meet the constraints of your output format.  In
formats which only support a limited number of sections, such as
<code>a.out</code>, the name must be one of the names supported by the format
(<code>a.out</code>, for example, allows only <code>.text</code>, <code>.data</code> or
<code>.bss</code>). If the output format supports any number of sections, but
with numbers and not names (as is the case for Oasys), the name should be
supplied as a quoted numeric string.  A section name may consist of any
sequence of characters, but any name which does not conform to the standard
<code>ld</code> symbol name syntax must be quoted.
See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC9">Symbol Names</a>.

</p>
<p>
The special <var>secname</var> <samp>`/DISCARD/'</samp> may be used to discard input
sections.  Any sections which are assigned to an output section named
<samp>`/DISCARD/'</samp> are not included in the final link output.

</p>
<p>
The linker will not create output sections which do not have any
contents.  This is for convenience when referring to input sections that
may or may not exist.  For example,

</p><pre>.foo { *(.foo) }
</pre>

<p>
will only create a <samp>`.foo'</samp> section in the output file if there is a
<samp>`.foo'</samp> section in at least one input file.

</p>


<h3><a name="SEC19" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC19">Section Placement</a></h3>

<p>
<a name="IDX267"></a>
In a section definition, you can specify the contents of an output
section by listing particular input files, by listing particular
input-file sections, or by a combination of the two.  You can also place
arbitrary data in the section, and define symbols relative to the
beginning of the section.

</p>
<p>
The <var>contents</var> of a section definition may include any of the
following kinds of statement.  You can include as many of these as you
like in a single section definition, separated from one another by
whitespace.

</p>
<dl compact="">

<dt><code><var>filename</var></code>
</dt><dd>
<a name="IDX268"></a>
 <a name="IDX269"></a>
 <a name="IDX270"></a>
 
You may simply name a particular input file to be placed in the current
output section; <em>all</em> sections from that file are placed in the
current section definition.  If the file name has already been mentioned
in another section definition, with an explicit section name list, then
only those sections which have not yet been allocated are used.

To specify a list of particular files by name:

<pre>.data : { afile.o bfile.o cfile.o }
</pre>

The example also illustrates that multiple statements can be included in
the contents of a section definition, since each file name is a separate
statement. 

<a name="IDX271"></a>
<a name="IDX272"></a>
</dd><dt><code><var>filename</var>( <var>section</var> )</code>
</dt><dd>
</dd><dt><code><var>filename</var>( <var>section</var> , <var>section</var>, ... )</code>
</dt><dd>
</dd><dt><code><var>filename</var>( <var>section</var> <var>section</var> ... )</code>
</dt><dd>
You can name one or more sections from your input files, for insertion
in the current output section.  If you wish to specify a list of
input-file sections inside the parentheses, separate the section names
with whitespace.

<a name="IDX273"></a>
<a name="IDX274"></a>
</dd><dt><code>* (<var>section</var>)</code>
</dt><dd>
</dd><dt><code>* (<var>section</var>, <var>section</var>, ...)</code>
</dt><dd>
</dd><dt><code>* (<var>section</var> <var>section</var> ...)</code>
</dt><dd>
Instead of explicitly naming particular input files in a link control
script, you can refer to <em>all</em> files from the <code>ld</code> command
line: use <samp>`*'</samp> instead of a particular file name before the
parenthesized input-file section list.  

If you have already explicitly included some files by name, <samp>`*'</samp>
refers to all <em>remaining</em> files--those whose places in the output
file have not yet been defined.

For example, to copy sections <code>1</code> through <code>4</code> from an Oasys file
into the <code>.text</code> section of an <code>a.out</code> file, and sections <code>13</code>
and <code>14</code> into the <code>.data</code> section:

<pre>SECTIONS {
  .text :{
    *("1" "2" "3" "4")
  }
  
  .data :{
    *("13" "14")
  }
}
</pre>

<a name="IDX275"></a>
<samp>`[ <var>section</var> ... ]'</samp> used to be accepted as an alternate way
to specify named sections from all unallocated input files.  Because
some operating systems (VMS) allow brackets in file names, that notation
is no longer supported.

<a name="IDX276"></a>
<a name="IDX277"></a>
<a name="IDX278"></a>
</dd><dt><code><var>filename</var><code>( COMMON )</code></code>
</dt><dd>
</dd><dt><code>*( COMMON )</code>
</dt><dd>
Specify where in your output file to place uninitialized data
with this notation.  <code>*(COMMON)</code> by itself refers to all
uninitialized data from all input files (so far as it is not yet
allocated); <var>filename</var><code>(COMMON)</code> refers to uninitialized data
from a particular file.  Both are special cases of the general
mechanisms for specifying where to place input-file sections:
<code>ld</code> permits you to refer to uninitialized data as if it
were in an input-file section named <code>COMMON</code>, regardless of the
input file's format.
</dd></dl>

<p>
In any place where you may use a specific file or section name, you may
also use a wildcard pattern.  The linker handles wildcards much as the
Unix shell does.  A <samp>`*'</samp> character matches any number of characters.
A <samp>`?'</samp> character matches any single character.  The sequence
<samp>`[<var>chars</var>]'</samp> will match a single instance of any of the
<var>chars</var>; the <samp>`-'</samp> character may be used to specify a range of
characters, as in <samp>`[a-z]'</samp> to match any lower case letter.  A
<samp>`\'</samp> character may be used to quote the following character.

</p>
<p>
When a file name is matched with a wildcard, the wildcard characters
will not match a <samp>`/'</samp> character (used to separate directory names on
Unix).  A pattern consisting of a single <samp>`*'</samp> character is an
exception; it will always match any file name.  In a section name, the
wildcard characters will match a <samp>`/'</samp> character.

</p>
<p>
Wildcards only match files which are explicitly specified on the command
line.  The linker does not search directories to expand wildcards.
However, if you specify a simple file name--a name with no wildcard
characters--in a linker script, and the file name is not also specified
on the command line, the linker will attempt to open the file as though
it appeared on the command line.

</p>
<p>
In the following example, the command script arranges the output file
into three consecutive sections, named <code>.text</code>, <code>.data</code>, and
<code>.bss</code>, taking the input for each from the correspondingly named
sections of all the input files:

</p>

<pre>SECTIONS { 
  .text : { *(.text) }
  .data : { *(.data) } 
  .bss :  { *(.bss)  *(COMMON) } 
} 
</pre>

<p>
The following example reads all of the sections from file <code>all.o</code>
and places them at the start of output section <code>outputa</code> which
starts at location <code>0x10000</code>. All of section <code>.input1</code> from
file <code>foo.o</code> follows immediately, in the same output section.  All
of section <code>.input2</code> from <code>foo.o</code> goes into output section
<code>outputb</code>, followed by section <code>.input1</code> from <code>foo1.o</code>.
All of the remaining <code>.input1</code> and <code>.input2</code> sections from any
files are written to output section <code>outputc</code>.

</p>

<pre>SECTIONS {
  outputa 0x10000 :
    {
    all.o
    foo.o (.input1)
    }
  outputb :
    {
    foo.o (.input2)
    foo1.o (.input1)
    }
  outputc :
    {
    *(.input1)
    *(.input2)
    }
}
</pre>

<p>
This example shows how wildcard patterns might be used to partition
files.  All <code>.text</code> sections are placed in <code>.text</code>, and all
<code>.bss</code> sections are placed in <code>.bss</code>.  For all files beginning
with an upper case character, the <code>.data</code> section is placed into
<code>.DATA</code>; for all other files, the <code>.data</code> section is placed
into <code>.data</code>.

</p>

<pre>SECTIONS {
  .text : { *(.text) }
  .DATA : { [A-Z]*(.data) }
  .data : { *(.data) }
  .bss : { *(.bss) }
}
</pre>



<h3><a name="SEC20" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC20">Section Data Expressions</a></h3>

<p>
<a name="IDX279"></a>
The foregoing statements arrange, in your output file, data originating
from your input files.  You can also place data directly in an output
section from the link command script.  Most of these additional
statements involve expressions (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC7">Expressions</a>).  Although these
statements are shown separately here for ease of presentation, no such
segregation is needed within a section definition in the <code>SECTIONS</code>
command; you can intermix them freely with any of the statements we've
just described.

</p>
<dl compact="">

<dt><code>CREATE_OBJECT_SYMBOLS</code>
</dt><dd>
<a name="IDX280"></a>
 <a name="IDX281"></a>
 <a name="IDX282"></a>
 
Create a symbol for each input file
in the current section, set to the address of the first byte of
data written from that input file.  For instance, with <code>a.out</code>
files it is conventional to have a symbol for each input file.  You can
accomplish this by defining the output <code>.text</code> section as follows:

<pre>SECTIONS {
  .text 0x2020 :
     {
    CREATE_OBJECT_SYMBOLS
    *(.text)
    _etext = ALIGN(0x2000);
    }
  ...
}
</pre>

If <code>sample.ld</code> is a file containing this script, and <code>a.o</code>,
<code>b.o</code>, <code>c.o</code>, and <code>d.o</code> are four input files with
contents like the following---

<pre>/* a.c */

afunction() { }
int adata=1;
int abss;
</pre>

<samp>`ld -M -T sample.ld a.o b.o c.o d.o'</samp> would create a map like this,
containing symbols matching the object file names:

<pre>00000000 A __DYNAMIC
00004020 B _abss
00004000 D _adata
00002020 T _afunction
00004024 B _bbss
00004008 D _bdata
00002038 T _bfunction
00004028 B _cbss
00004010 D _cdata
00002050 T _cfunction
0000402c B _dbss
00004018 D _ddata
00002068 T _dfunction
00004020 D _edata
00004030 B _end
00004000 T _etext
00002020 t a.o
00002038 t b.o
00002050 t c.o
00002068 t d.o
</pre>

<a name="IDX283"></a>
<a name="IDX284"></a>
</dd><dt><code><var>symbol</var> = <var>expression</var> ;</code>
</dt><dd>
</dd><dt><code><var>symbol</var> <var>f</var>= <var>expression</var> ;</code>
</dt><dd>
<var>symbol</var> is any symbol name (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC9">Symbol Names</a>).  "<var>f</var>=" 
refers to any of the operators <code>&amp;= += -= *= /=</code> which combine
arithmetic and assignment.

<a name="IDX285"></a>
When you assign a value to a symbol within a particular section
definition, the value is relative to the beginning of the section
(see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC13">Assignment: Defining Symbols</a>).  If you write


<pre>SECTIONS {
  abs = 14 ;
  ...
  .data : { ... rel = 14 ; ... }
  abs2 = 14 + ADDR(.data);
  ...
}
</pre>

<code>abs</code> and <code>rel</code> do not have the same value; <code>rel</code> has the
same value as <code>abs2</code>.

<a name="IDX286"></a>
<a name="IDX287"></a>
<a name="IDX288"></a>
<a name="IDX289"></a>
<a name="IDX290"></a>
<a name="IDX291"></a>
</dd><dt><code>BYTE(<var>expression</var>)</code>
</dt><dd>
</dd><dt><code>SHORT(<var>expression</var>)</code>
</dt><dd>
</dd><dt><code>LONG(<var>expression</var>)</code>
</dt><dd>
</dd><dt><code>QUAD(<var>expression</var>)</code>
</dt><dd>
</dd><dt><code>SQUAD(<var>expression</var>)</code>
</dt><dd>
By including one of these four statements in a section definition, you
can explicitly place one, two, four, eight unsigned, or eight signed
bytes (respectively) at the current address of that section.  When using
a 64 bit host or target, <code>QUAD</code> and <code>SQUAD</code> are the same.
When both host and target are 32 bits, <code>QUAD</code> uses an unsigned 32
bit value, and <code>SQUAD</code> sign extends the value.  Both will use the
correct endianness when writing out the value.

Multiple-byte quantities are represented in whatever byte order is
appropriate for the output file format (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC30">BFD</a>).

<a name="IDX292"></a>
<a name="IDX293"></a>
<a name="IDX294"></a>
</dd><dt><code>FILL(<var>expression</var>)</code>
</dt><dd>
Specify the "fill pattern" for the current section.  Any otherwise
unspecified regions of memory within the section (for example, regions
you skip over by assigning a new value to the location counter <samp>`.'</samp>)
are filled with the two least significant bytes from the
<var>expression</var> argument.  A <code>FILL</code> statement covers memory
locations <em>after</em> the point it occurs in the section definition; by
including more than one <code>FILL</code> statement, you can have different
fill patterns in different parts of an output section.
</dd></dl>



<h3><a name="SEC21" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC21">Optional Section Attributes</a></h3>
<p>
<a name="IDX295"></a>
Here is the full syntax of a section definition, including all the
optional portions:

</p>

<pre>SECTIONS {
...
<var>secname</var> <var>start</var> BLOCK(<var>align</var>) (NOLOAD) : AT ( <var>ldadr</var> )
  { <var>contents</var> } &gt;<var>region</var> :<var>phdr</var> =<var>fill</var>
...
}
</pre>

<p>
<var>secname</var> and <var>contents</var> are required.  See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC18">Section Definitions</a>, and section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC19">Section Placement</a>, for details on
<var>contents</var>.  The remaining elements---<var>start</var>,
<code>BLOCK(<var>align)</var></code>, <code>(NOLOAD)</code>, <code>AT ( <var>ldadr</var> )</code>,
<code>&gt;<var>region</var></code>, <code>:<var>phdr</var></code>, and <code>=<var>fill</var></code>---are
all optional.

</p>
<dl compact="">

<dt><code><var>start</var></code>
</dt><dd>
<a name="IDX296"></a>
 <a name="IDX297"></a>
 <a name="IDX298"></a>
 
You can force the output section to be loaded at a specified address by
specifying <var>start</var> immediately following the section name.
<var>start</var> can be represented as any expression. The following
example generates section <var>output</var> at location
<code>0x40000000</code>:


<pre>SECTIONS {
  ...
  output 0x40000000: {
    ...
    }
  ...
}
</pre>

<a name="IDX299"></a>
<a name="IDX300"></a>
<a name="IDX301"></a>
</dd><dt><code>BLOCK(<var>align</var>)</code>
</dt><dd>
You can include <code>BLOCK()</code> specification to advance
the location counter <code>.</code> prior to the beginning of the section, so
that the section will begin at the specified alignment.  <var>align</var> is
an expression.

<a name="IDX302"></a>
<a name="IDX303"></a>
<a name="IDX304"></a>
</dd><dt><code>(NOLOAD)</code>
</dt><dd>
The <samp>`(NOLOAD)'</samp> directive will mark a section to not be loaded at
run time.  The linker will process the section normally, but will mark
it so that a program loader will not load it into memory.  For example,
in the script sample below, the <code>ROM</code> section is addressed at
memory location <samp>`0'</samp> and does not need to be loaded when the program
is run.  The contents of the <code>ROM</code> section will appear in the
linker output file as usual.


<pre>SECTIONS {
  ROM  0  (NOLOAD)  : { ... }
  ...
}
</pre>

<a name="IDX305"></a>
<a name="IDX306"></a>
<a name="IDX307"></a>
</dd><dt><code>AT ( <var>ldadr</var> )</code>
</dt><dd>
The expression <var>ldadr</var> that follows the <code>AT</code> keyword specifies
the load address of the section.  The default (if you do not use the
<code>AT</code> keyword) is to make the load address the same as the
relocation address.  This feature is designed to make it easy to build a
ROM image.  For example, this <code>SECTIONS</code> definition creates two
output sections: one called <samp>`.text'</samp>, which starts at <code>0x1000</code>,
and one called <samp>`.mdata'</samp>, which is loaded at the end of the
<samp>`.text'</samp> section even though its relocation address is
<code>0x2000</code>.  The symbol <code>_data</code> is defined with the value
<code>0x2000</code>:


<pre>SECTIONS
  {
  .text 0x1000 : { *(.text) _etext = . ; }
  .mdata 0x2000 : 
    AT ( ADDR(.text) + SIZEOF ( .text ) )
    { _data = . ; *(.data); _edata = . ;  }
  .bss 0x3000 :
    { _bstart = . ;  *(.bss) *(COMMON) ; _bend = . ;}
}
</pre>

The run-time initialization code (for C programs, usually <code>crt0</code>)
for use with a ROM generated this way has to include something like
the following, to copy the initialized data from the ROM image to its runtime
address:


<pre>char *src = _etext;
char *dst = _data;

/* ROM has data at end of text; copy it. */
while (dst &lt; _edata) {
  *dst++ = *src++;
}

/* Zero bss */
for (dst = _bstart; dst&lt; _bend; dst++)
  *dst = 0;
</pre>

<a name="IDX308"></a>
<a name="IDX309"></a>
<a name="IDX310"></a>
</dd><dt><code>&gt;<var>region</var></code>
</dt><dd>
Assign this section to a previously defined region of memory.  
See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC16">Memory Layout</a>.

<a name="IDX311"></a>
<a name="IDX312"></a>
<a name="IDX313"></a>
</dd><dt><code>:<var>phdr</var></code>
</dt><dd>
Assign this section to a segment described by a program header.
See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC23">ELF Program Headers</a>.  If a section is assigned to one or more segments, then
all subsequent allocated sections will be assigned to those segments as
well, unless they use an explicitly <code>:<var>phdr</var></code> modifier.  To
prevent a section from being assigned to a segment when it would
normally default to one, use <code>:NONE</code>.

<a name="IDX314"></a>
<a name="IDX315"></a>
<a name="IDX316"></a>
</dd><dt><code>=<var>fill</var></code>
</dt><dd>
Including <code>=<var>fill</var></code> in a section definition specifies the
initial fill value for that section.  You may use any expression to
specify <var>fill</var>.  Any unallocated holes in the current output section
when written to the output file will be filled with the two least
significant bytes of the value, repeated as necessary.  You can also
change the fill value with a <code>FILL</code> statement in the <var>contents</var>
of a section definition.

</dd></dl>



<h3><a name="SEC22" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC22">Overlays</a></h3>
<p>
<a name="IDX317"></a>
<a name="IDX318"></a>

</p>
<p>
The <code>OVERLAY</code> command provides an easy way to describe sections
which are to be loaded as part of a single memory image but are to be
run at the same memory address.  At run time, some sort of overlay
manager will copy the overlaid sections in and out of the runtime memory
address as required, perhaps by simply manipulating addressing bits.
This approach can be useful, for example, when a certain region of
memory is faster than another.

</p>
<p>
The <code>OVERLAY</code> command is used within a <code>SECTIONS</code> command.  It
appears as follows:

</p><pre>  OVERLAY <var>start</var> : [ NOCROSSREFS ] AT ( <var>ldaddr</var> )
   {
     <var>secname1</var> { <var>contents</var> } :<var>phdr</var> =<var>fill</var>
     <var>secname2</var> { <var>contents</var> } :<var>phdr</var> =<var>fill</var>
     ...
   } &gt;<var>region</var> :<var>phdr</var> =<var>fill</var>
</pre>

<p>
Everything is optional except <code>OVERLAY</code> (a keyword), and each
section must have a name (<var>secname1</var> and <var>secname2</var> above).  The
section definitions within the <code>OVERLAY</code> construct are identical to
those within the general <code>SECTIONS</code> contruct (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC17">Specifying Output Sections</a>),
except that no addresses and no memory regions may be defined for
sections within an <code>OVERLAY</code>.

</p>
<p>
The sections are all defined with the same starting address.  The load
addresses of the sections are arranged such that they are consecutive in
memory starting at the load address used for the <code>OVERLAY</code> as a
whole (as with normal section definitions, the load address is optional,
and defaults to the start address; the start address is also optional,
and defaults to <code>.</code>).

</p>
<p>
If the <code>NOCROSSREFS</code> keyword is used, and there any references
among the sections, the linker will report an error.  Since the sections
all run at the same address, it normally does not make sense for one
section to refer directly to another.  See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC26">Option Commands</a>.

</p>
<p>
For each section within the <code>OVERLAY</code>, the linker automatically
defines two symbols.  The symbol <code>__load_start_<var>secname</var></code> is
defined as the starting load address of the section.  The symbol
<code>__load_stop_<var>secname</var></code> is defined as the final load address of
the section.  Any characters within <var>secname</var> which are not legal
within C identifiers are removed.  C (or assembler) code may use these
symbols to move the overlaid sections around as necessary.

</p>
<p>
At the end of the overlay, the value of <code>.</code> is set to the start
address of the overlay plus the size of the largest section.

</p>
<p>
Here is an example.  Remember that this would appear inside a
<code>SECTIONS</code> construct.

</p>

<pre>  OVERLAY 0x1000 : AT (0x4000)
   {
     .text0 { o1/*.o(.text) }
     .text1 { o2/*.o(.text) }
   }
</pre>

<p>
This will define both <code>.text0</code> and <code>.text1</code> to start at
address 0x1000.  <code>.text0</code> will be loaded at address 0x4000, and
<code>.text1</code> will be loaded immediately after <code>.text0</code>.  The
following symbols will be defined: <code>__load_start_text0</code>,
<code>__load_stop_text0</code>, <code>__load_start_text1</code>,
<code>__load_stop_text1</code>.

</p>
<p>
C code to copy overlay <code>.text1</code> into the overlay area might look
like the following.

</p>

<pre>  extern char __load_start_text1, __load_stop_text1;
  memcpy ((char *) 0x1000, &amp;__load_start_text1,
          &amp;__load_stop_text1 - &amp;__load_start_text1);
</pre>

<p>
Note that the <code>OVERLAY</code> command is just syntactic sugar, since
everything it does can be done using the more basic commands.  The above
example could have been written identically as follows.

</p>

<pre>  .text0 0x1000 : AT (0x4000) { o1/*.o(.text) }
  __load_start_text0 = LOADADDR (.text0);
  __load_stop_text0 = LOADADDR (.text0) + SIZEOF (.text0);
  .text1 0x1000 : AT (0x4000 + SIZEOF (.text0)) { o2/*.o(.text) }
  __load_start_text1 = LOADADDR (.text1);
  __load_stop_text1 = LOADADDR (.text1) + SIZEOF (.text1);
  . = 0x1000 + MAX (SIZEOF (.text0), SIZEOF (.text1));
</pre>



<h2><a name="SEC23" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC23">ELF Program Headers</a></h2>
<p>
<a name="IDX319"></a>
<a name="IDX320"></a>
<a name="IDX321"></a>

</p>
<p>
The ELF object file format uses <em>program headers</em>, which are read by
the system loader and describe how the program should be loaded into
memory.  These program headers must be set correctly in order to run the
program on a native ELF system.  The linker will create reasonable
program headers by default.  However, in some cases, it is desirable to
specify the program headers more precisely; the <code>PHDRS</code> command may
be used for this purpose.  When the <code>PHDRS</code> command is used, the
linker will not generate any program headers itself.

</p>
<p>
The <code>PHDRS</code> command is only meaningful when generating an ELF
output file.  It is ignored in other cases.  This manual does not
describe the details of how the system loader interprets program
headers; for more information, see the ELF ABI.  The program headers of
an ELF file may be displayed using the <samp>`-p'</samp> option of the
<code>objdump</code> command.

</p>
<p>
This is the syntax of the <code>PHDRS</code> command.  The words <code>PHDRS</code>,
<code>FILEHDR</code>, <code>AT</code>, and <code>FLAGS</code> are keywords.

</p>

<pre>PHDRS
{
  <var>name</var> <var>type</var> [ FILEHDR ] [ PHDRS ] [ AT ( <var>address</var> ) ]
        [ FLAGS ( <var>flags</var> ) ] ;
}
</pre>

<p>
The <var>name</var> is used only for reference in the <code>SECTIONS</code> command
of the linker script.  It does not get put into the output file.

</p>
<p>
Certain program header types describe segments of memory which are
loaded from the file by the system loader.  In the linker script, the
contents of these segments are specified by directing allocated output
sections to be placed in the segment.  To do this, the command
describing the output section in the <code>SECTIONS</code> command should use
<samp>`:<var>name</var>'</samp>, where <var>name</var> is the name of the program header
as it appears in the <code>PHDRS</code> command.  See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC21">Optional Section Attributes</a>.

</p>
<p>
It is normal for certain sections to appear in more than one segment.
This merely implies that one segment of memory contains another.  This
is specified by repeating <samp>`:<var>name</var>'</samp>, using it once for each
program header in which the section is to appear.

</p>
<p>
If a section is placed in one or more segments using <samp>`:<var>name</var>'</samp>,
then all subsequent allocated sections which do not specify
<samp>`:<var>name</var>'</samp> are placed in the same segments.  This is for
convenience, since generally a whole set of contiguous sections will be
placed in a single segment.  To prevent a section from being assigned to
a segment when it would normally default to one, use <code>:NONE</code>.

</p>
<p>
The <code>FILEHDR</code> and <code>PHDRS</code> keywords which may appear after the
program header type also indicate contents of the segment of memory.
The <code>FILEHDR</code> keyword means that the segment should include the ELF
file header.  The <code>PHDRS</code> keyword means that the segment should
include the ELF program headers themselves.

</p>
<p>
The <var>type</var> may be one of the following.  The numbers indicate the
value of the keyword.

</p>
<dl compact="">

<dt><code>PT_NULL</code> (0)
</dt><dd>
Indicates an unused program header.

</dd><dt><code>PT_LOAD</code> (1)
</dt><dd>
Indicates that this program header describes a segment to be loaded from
the file.

</dd><dt><code>PT_DYNAMIC</code> (2)
</dt><dd>
Indicates a segment where dynamic linking information can be found.

</dd><dt><code>PT_INTERP</code> (3)
</dt><dd>
Indicates a segment where the name of the program interpreter may be
found.

</dd><dt><code>PT_NOTE</code> (4)
</dt><dd>
Indicates a segment holding note information.

</dd><dt><code>PT_SHLIB</code> (5)
</dt><dd>
A reserved program header type, defined but not specified by the ELF
ABI.

</dd><dt><code>PT_PHDR</code> (6)
</dt><dd>
Indicates a segment where the program headers may be found.

</dd><dt><var>expression</var>
</dt><dd>
An expression giving the numeric type of the program header.  This may
be used for types not defined above.
</dd></dl>

<p>
It is possible to specify that a segment should be loaded at a
particular address in memory.  This is done using an <code>AT</code>
expression.  This is identical to the <code>AT</code> command used in the
<code>SECTIONS</code> command (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC21">Optional Section Attributes</a>).  Using the <code>AT</code>
command for a program header overrides any information in the
<code>SECTIONS</code> command.

</p>
<p>
Normally the segment flags are set based on the sections.  The
<code>FLAGS</code> keyword may be used to explicitly specify the segment
flags.  The value of <var>flags</var> must be an integer.  It is used to
set the <code>p_flags</code> field of the program header.

</p>
<p>
Here is an example of the use of <code>PHDRS</code>.  This shows a typical set
of program headers used on a native ELF system.

</p>

<pre>PHDRS
{
  headers PT_PHDR PHDRS ;
  interp PT_INTERP ;
  text PT_LOAD FILEHDR PHDRS ;
  data PT_LOAD ;
  dynamic PT_DYNAMIC ;
}

SECTIONS
{
  . = SIZEOF_HEADERS;
  .interp : { *(.interp) } :text :interp
  .text : { *(.text) } :text
  .rodata : { *(.rodata) } /* defaults to :text */
  ...
  . = . + 0x1000; /* move to a new page in memory */
  .data : { *(.data) } :data
  .dynamic : { *(.dynamic) } :data :dynamic
  ...
}
</pre>



<h2><a name="SEC24" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC24">The Entry Point</a></h2>
<p>
<a name="IDX322"></a>
<a name="IDX323"></a>
<a name="IDX324"></a>
The linker command language includes a command specifically for
defining the first executable instruction in an output file (its
<em>entry point</em>).  Its argument is a symbol name:

</p><pre>ENTRY(<var>symbol</var>)
</pre>

<p>
Like symbol assignments, the <code>ENTRY</code> command may be placed either
as an independent command in the command file, or among the section
definitions within the <code>SECTIONS</code> command--whatever makes the most
sense for your layout.

</p>
<p>
<a name="IDX325"></a>
<code>ENTRY</code> is only one of several ways of choosing the entry point.
You may indicate it in any of the following ways (shown in descending
order of priority: methods higher in the list override methods lower down).

</p><ul>
<li>

the <samp>`-e'</samp> <var>entry</var> command-line option;
</li><li>

the <code>ENTRY(<var>symbol</var>)</code> command in a linker control script;
</li><li>

the value of the symbol <code>start</code>, if present;
</li><li>

the address of the first byte of the <code>.text</code> section, if present;
</li><li>

The address <code>0</code>.
</li></ul>

<p>
For example, you can use these rules to generate an entry point with an
assignment statement: if no symbol <code>start</code> is defined within your
input files, you can simply define it, assigning it an appropriate
value---

</p>

<pre>start = 0x2020;
</pre>

<p>
The example shows an absolute address, but you can use any expression.
For example, if your input object files use some other symbol-name
convention for the entry point, you can just assign the value of
whatever symbol contains the start address to <code>start</code>:

</p>

<pre>start = other_symbol ;
</pre>



<h2><a name="SEC25" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC25">Version Script</a></h2>
<p>
<a name="IDX326"></a>
<a name="IDX327"></a>
<a name="IDX328"></a>
<a name="IDX329"></a>
The linker command script includes a command specifically for
specifying a version script, and is only meaningful for ELF platforms
that support shared libraries.  A version script can be
build directly into the linker script that you are using, or you
can supply the version script as just another input file to the linker
at the time that you link.  The command script syntax is:

</p><pre>VERSION { version script contents }
</pre>

<p>
The version script can also be specified to the linker by means of the
<samp>`--version-script'</samp> linker command line option.
Version scripts are only meaningful when creating shared libraries.

</p>
<p>
The format of the version script itself is identical to that used by
Sun's linker in Solaris 2.5.  Versioning is done by defining a tree of
version nodes with the names and interdependencies specified in the
version script.  The version script can specify which symbols are bound
to which version nodes, and it can reduce a specified set of symbols to
local scope so that they are not globally visible outside of the shared
library.

</p>
<p>
The easiest way to demonstrate the version script language is with a few
examples.

</p>

<pre>VERS_1.1 {
	 global:
		 foo1;
	 local:
		 old*; 
		 original*; 
		 new*; 
};

VERS_1.2 {
		 foo2;
} VERS_1.1;

VERS_2.0 {
		 bar1; bar2;
} VERS_1.2;
</pre>

<p>
In this example, three version nodes are defined.  <samp>`VERS_1.1'</samp> is the
first version node defined, and has no other dependencies.  The symbol
<samp>`foo1'</samp> is bound to this version node, and a number of symbols
that have appeared within various object files are reduced in scope to
local so that they are not visible outside of the shared library.

</p>
<p>
Next, the node <samp>`VERS_1.2'</samp> is defined.  It depends upon
<samp>`VERS_1.1'</samp>.  The symbol <samp>`foo2'</samp> is bound to this version node.

</p>
<p>
Finally, the node <samp>`VERS_2.0'</samp> is defined.  It depends upon
<samp>`VERS_1.2'</samp>.  The symbols <samp>`bar1'</samp> and <samp>`bar2'</samp> are bound to
this version node.

</p>
<p>
Symbols defined in the library which aren't specifically bound to a
version node are effectively bound to an unspecified base version of the
library.  It is possible to bind all otherwise unspecified symbols to a
given version node using <samp>`global: *'</samp> somewhere in the version
script.

</p>
<p>
Lexically the names of the version nodes have no specific meaning other
than what they might suggest to the person reading them.  The <samp>`2.0'</samp>
version could just as well have appeared in between <samp>`1.1'</samp> and
<samp>`1.2'</samp>.  However, this would be a confusing way to write a version
script.

</p>
<p>
When you link an application against a shared library that has versioned
symbols, the application itself knows which version of each symbol it requires,
and it also knows which version nodes it needs from each shared library it is
linked against.  Thus at runtime, the dynamic loader can make a quick check to
make sure that the libraries you have linked against do in fact supply all
of the version nodes that the application will need to resolve all of the
dynamic symbols.  In this way it is possible for the dynamic linker to know
with certainty that all external symbols that it needs will be resolvable
without having to search for each symbol reference.

</p>
<p>
The symbol versioning is in effect a much more sophisticated way of
doing minor version checking that SunOS does.  The fundamental problem
that is being addressed here is that typically references to external
functions are bound on an as-needed basis, and are not all bound when
the application starts up.  If a shared library is out of date, a
required interface may be missing; when the application tries to use
that interface, it may suddenly and unexpectedly fail.  With symbol
versioning, the user will get a warning when they start their program if
the libraries being used with the application are too old.

</p>
<p>
There are several GNU extensions to Sun's versioning approach.  The
first of these is the ability to bind a symbol to a version node in the
source file where the symbol is defined instead of in the versioning
script.  This was done mainly to reduce the burden on the library
maintainer.  This can be done by putting something like:

</p>

<pre>__asm__(".symver original_foo,foo@VERS_1.1");
</pre>

<p>
in the C source file.  This renamed the function <samp>`original_foo'</samp> to
be an alias for <samp>`foo'</samp> bound to the version node <samp>`VERS_1.1'</samp>.
The <samp>`local:'</samp> directive can be used to prevent the symbol
<samp>`original_foo'</samp> from being exported.

</p>
<p>
The second GNU extension is to allow multiple versions of the same function
to appear in a given shared library.  In this way an incompatible change to
an interface can take place without increasing the major version number of
the shared library, while still allowing applications linked against the old
interface to continue to function.

</p>
<p>
This can only be accomplished by using multiple <samp>`.symver'</samp>
directives in the assembler.  An example of this would be:

</p>

<pre>__asm__(".symver original_foo,foo@");
__asm__(".symver old_foo,foo@VERS_1.1");
__asm__(".symver old_foo1,foo@VERS_1.2");
__asm__(".symver new_foo,foo@@VERS_2.0");
</pre>

<p>
In this example, <samp>`foo@'</samp> represents the symbol <samp>`foo'</samp> bound to the
unspecified base version of the symbol.  The source file that contains this
example would define 4 C functions: <samp>`original_foo'</samp>, <samp>`old_foo'</samp>,
<samp>`old_foo1'</samp>, and <samp>`new_foo'</samp>.

</p>
<p>
When you have multiple definitions of a given symbol, there needs to be
some way to specify a default version to which external references to
this symbol will be bound.  This can be accomplished with the
<samp>`foo@@VERS_2.0'</samp> type of <samp>`.symver'</samp> directive.  Only one version of
a symbol can be declared 'default' in this manner - otherwise you would
effectively have multiple definitions of the same symbol.

</p>
<p>
If you wish to bind a reference to a specific version of the symbol
within the shared library, you can use the aliases of convenience
(i.e. <samp>`old_foo'</samp>), or you can use the <samp>`.symver'</samp> directive to
specifically bind to an external version of the function in question.

</p>


<h2><a name="SEC26" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC26">Option Commands</a></h2>
<p>
The command language includes a number of other commands that you can
use for specialized purposes.  They are similar in purpose to
command-line options.

</p>
<dl compact="">

<dt><code>CONSTRUCTORS</code>
</dt><dd>
<a name="IDX330"></a>
 <a name="IDX331"></a>
 <a name="IDX332"></a>
 
When linking using the <code>a.out</code> object file format, the linker uses
an unusual set construct to support C++ global constructors and
destructors.  When linking object file formats which do not support
arbitrary sections, such as <code>ECOFF</code> and <code>XCOFF</code>, the linker
will automatically recognize C++ global constructors and destructors by
name.  For these object file formats, the <code>CONSTRUCTORS</code> command
tells the linker where this information should be placed.  The
<code>CONSTRUCTORS</code> command is ignored for other object file formats.

The symbol <code>__CTOR_LIST__</code> marks the start of the global
constructors, and the symbol <code>__DTOR_LIST</code> marks the end.  The
first word in the list is the number of entries, followed by the address
of each constructor or destructor, followed by a zero word.  The
compiler must arrange to actually run the code.  For these object file
formats GNU C++ calls constructors from a subroutine <code>__main</code>;
a call to <code>__main</code> is automatically inserted into the startup code
for <code>main</code>.  GNU C++ runs destructors either by using
<code>atexit</code>, or directly from the function <code>exit</code>.

For object file formats such as <code>COFF</code> or <code>ELF</code> which support
multiple sections, GNU C++ will normally arrange to put the
addresses of global constructors and destructors into the <code>.ctors</code>
and <code>.dtors</code> sections.  Placing the following sequence into your
linker script will build the sort of table which the GNU C++
runtime code expects to see.


<pre>      __CTOR_LIST__ = .;
      LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
      *(.ctors)
      LONG(0)
      __CTOR_END__ = .;
      __DTOR_LIST__ = .;
      LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
      *(.dtors)
      LONG(0)
      __DTOR_END__ = .;
</pre>

Normally the compiler and linker will handle these issues automatically,
and you will not need to concern yourself with them.  However, you may
need to consider this if you are using C++ and writing your own linker
scripts.

<a name="IDX333"></a>
<a name="IDX334"></a>
</dd><dt><code>FLOAT</code>
</dt><dd>
</dd><dt><code>NOFLOAT</code>
</dt><dd>
These keywords were used in some older linkers to request a particular
math subroutine library.  <code>ld</code> doesn't use the keywords, assuming
instead that any necessary subroutines are in libraries specified using
the general mechanisms for linking to archives; but to permit the use of
scripts that were written for the older linkers, the keywords
<code>FLOAT</code> and <code>NOFLOAT</code> are accepted and ignored.

<a name="IDX335"></a>
<a name="IDX336"></a>
</dd><dt><code>FORCE_COMMON_ALLOCATION</code>
</dt><dd>
This command has the same effect as the <samp>`-d'</samp> command-line option:
to make <code>ld</code> assign space to common symbols even if a relocatable
output file is specified (<samp>`-r'</samp>).

<a name="IDX337"></a>
<a name="IDX338"></a>
</dd><dt><code>INCLUDE <var>filename</var></code>
</dt><dd>
Include the linker script <var>filename</var> at this point.  The file will
be searched for in the current directory, and in any directory specified
with the <code>-L</code> option.  You can nest calls to <code>INCLUDE</code> up to
10 levels deep.

<a name="IDX339"></a>
<a name="IDX340"></a>
</dd><dt><code>INPUT ( <var>file</var>, <var>file</var>, ... )</code>
</dt><dd>
</dd><dt><code>INPUT ( <var>file</var> <var>file</var> ... )</code>
</dt><dd>
Use this command to include binary input files in the link, without
including them in a particular section definition.  
Specify the full name for each <var>file</var>, including <samp>`.a'</samp> if
required.

<code>ld</code> searches for each <var>file</var> through the archive-library
search path, just as for files you specify on the command line.
See the description of <samp>`-L'</samp> in section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC3">Command Line Options</a>.

If you use <samp>`-l<var>file</var>'</samp>, <code>ld</code> will transform the name to
<code>lib<var>file</var>.a</code> as with the command line argument <samp>`-l'</samp>.

<a name="IDX341"></a>
<a name="IDX342"></a>
</dd><dt><code>GROUP ( <var>file</var>, <var>file</var>, ... )</code>
</dt><dd>
</dd><dt><code>GROUP ( <var>file</var> <var>file</var> ... )</code>
</dt><dd>
This command is like <code>INPUT</code>, except that the named files should
all be archives, and they are searched repeatedly until no new undefined
references are created.  See the description of <samp>`-('</samp> in
section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC3">Command Line Options</a>.

<a name="IDX343"></a>
<a name="IDX344"></a>
</dd><dt><code>OUTPUT ( <var>filename</var> )</code>
</dt><dd>
Use this command to name the link output file <var>filename</var>.  The
effect of <code>OUTPUT(<var>filename</var>)</code> is identical to the effect of
<samp>`-o <var>filename</var>'</samp>, which overrides it.  You can use this
command to supply a default output-file name other than <code>a.out</code>.

<a name="IDX345"></a>
<a name="IDX346"></a>
</dd><dt><code>OUTPUT_ARCH ( <var>bfdname</var> )</code>
</dt><dd>
Specify a particular output machine architecture, with one of the names
used by the BFD back-end routines (see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC30">BFD</a>).  This command is often
unnecessary; the architecture is most often set implicitly by either the
system BFD configuration or as a side effect of the <code>OUTPUT_FORMAT</code>
command.

<a name="IDX347"></a>
<a name="IDX348"></a>
</dd><dt><code>OUTPUT_FORMAT ( <var>bfdname</var> )</code>
</dt><dd>
When <code>ld</code> is configured to support multiple object code formats,
you can use this command to specify a particular output format.
<var>bfdname</var> is one of the names used by the BFD back-end routines
(see section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC30">BFD</a>).  The effect is identical to the effect of the
<samp>`--oformat'</samp> command-line option.  This selection affects only the
output file; the related command <code>TARGET</code> affects primarily input
files.

<a name="IDX349"></a>
<a name="IDX350"></a>
<a name="IDX351"></a>
</dd><dt><code>SEARCH_DIR ( <var>path</var> )</code>
</dt><dd>
Add <var>path</var> to the list of paths where <code>ld</code> looks for
archive libraries.  <code>SEARCH_DIR(<var>path</var>)</code> has the same
effect as <samp>`-L<var>path</var>'</samp> on the command line.

<a name="IDX352"></a>
<a name="IDX353"></a>
</dd><dt><code>STARTUP ( <var>filename</var> )</code>
</dt><dd>
Ensure that <var>filename</var> is the first input file used in the link
process. 

<a name="IDX354"></a>
<a name="IDX355"></a>
</dd><dt><code>TARGET ( <var>format</var> )</code>
</dt><dd>
When <code>ld</code> is configured to support multiple object code formats,
you can use this command to change the input-file object code format
(like the command-line option <samp>`-b'</samp> or its synonym <samp>`--format'</samp>).
The argument <var>format</var> is one of the strings used by BFD to name
binary formats.  If <code>TARGET</code> is specified but <code>OUTPUT_FORMAT</code>
is not, the last <code>TARGET</code> argument is also used as the default
format for the <code>ld</code> output file.  See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC30">BFD</a>.

<a name="IDX356"></a>
If you don't use the <code>TARGET</code> command, <code>ld</code> uses the value of
the environment variable <code>GNUTARGET</code>, if available, to select the
output file format.  If that variable is also absent, <code>ld</code> uses
the default format configured for your machine in the BFD libraries.

<a name="IDX357"></a>
<a name="IDX358"></a>
</dd><dt><code>NOCROSSREFS ( <var>section</var> <var>section</var> ... )</code>
</dt><dd>
This command may be used to tell <code>ld</code> to issue an error about any
references among certain sections.

In certain types of programs, particularly on embedded systems, when one
section is loaded into memory, another section will not be.  Any direct
references between the two sections would be errors.  For example, it
would be an error if code in one section called a function defined in
the other section.

The <code>NOCROSSREFS</code> command takes a list of section names.  If
<code>ld</code> detects any cross references between the sections, it reports
an error and returns a non-zero exit status.  The <code>NOCROSSREFS</code>
command uses output section names, defined in the <code>SECTIONS</code>
command.  It does not use the names of input sections.
</dd></dl>



<h1><a name="SEC27" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC27">Machine Dependent Features</a></h1>

<p>
<a name="IDX359"></a>
<code>ld</code> has additional features on some platforms; the following
sections describe them.  Machines where <code>ld</code> has no additional
functionality are not listed.

</p>



<h2><a name="SEC28" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC28"><code>ld</code> and the H8/300</a></h2>

<p>
<a name="IDX360"></a>
For the H8/300, <code>ld</code> can perform these global optimizations when
you specify the <samp>`--relax'</samp> command-line option.

</p>
<dl compact="">

<dt><em>relaxing address modes</em>
</dt><dd>
<a name="IDX361"></a>
 
<code>ld</code> finds all <code>jsr</code> and <code>jmp</code> instructions whose
targets are within eight bits, and turns them into eight-bit
program-counter relative <code>bsr</code> and <code>bra</code> instructions,
respectively.

<a name="IDX362"></a>
</dd><dt><em>synthesizing instructions</em>
</dt><dd>
<code>ld</code> finds all <code>mov.b</code> instructions which use the
sixteen-bit absolute address form, but refer to the top
page of memory, and changes them to use the eight-bit address form.
(That is: the linker turns <samp>`mov.b <code>@</code><var>aa</var>:16'</samp> into
<samp>`mov.b <code>@</code><var>aa</var>:8'</samp> whenever the address <var>aa</var> is in the
top page of memory).
</dd></dl>



<h2><a name="SEC29" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC29"><code>ld</code> and the Intel 960 family</a></h2>

<p>
<a name="IDX363"></a>

</p>
<p>
You can use the <samp>`-A<var>architecture</var>'</samp> command line option to
specify one of the two-letter names identifying members of the 960
family; the option specifies the desired output target, and warns of any
incompatible instructions in the input files.  It also modifies the
linker's search strategy for archive libraries, to support the use of
libraries specific to each particular architecture, by including in the
search loop names suffixed with the string identifying the architecture.

</p>
<p>
For example, if your <code>ld</code> command line included <samp>`-ACA'</samp> as
well as <samp>`-ltry'</samp>, the linker would look (in its built-in search
paths, and in any paths you specify with <samp>`-L'</samp>) for a library with
the names

</p>

<pre>try
libtry.a
tryca
libtryca.a
</pre>

<p>
The first two possibilities would be considered in any event; the last
two are due to the use of <samp>`-ACA'</samp>.

</p>
<p>
You can meaningfully use <samp>`-A'</samp> more than once on a command line, since
the 960 architecture family allows combination of target architectures; each
use will add another pair of name variants to search for when <samp>`-l'</samp>
specifies a library.

</p>
<p>
<a name="IDX364"></a>
<a name="IDX365"></a>
<code>ld</code> supports the <samp>`--relax'</samp> option for the i960 family.  If
you specify <samp>`--relax'</samp>, <code>ld</code> finds all <code>balx</code> and
<code>calx</code> instructions whose targets are within 24 bits, and turns
them into 24-bit program-counter relative <code>bal</code> and <code>cal</code>
instructions, respectively.  <code>ld</code> also turns <code>cal</code>
instructions into <code>bal</code> instructions when it determines that the
target subroutine is a leaf routine (that is, the target subroutine does
not itself call any subroutines).

</p>



<h1><a name="SEC30" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC30">BFD</a></h1>

<p>
<a name="IDX366"></a>
<a name="IDX367"></a>
<a name="IDX368"></a>
<a name="IDX369"></a>
The linker accesses object and archive files using the BFD libraries.
These libraries allow the linker to use the same routines to operate on
object files whatever the object file format.  A different object file
format can be supported simply by creating a new BFD back end and adding
it to the library.  To conserve runtime memory, however, the linker and
associated tools are usually configured to support only a subset of the
object file formats available.  You can use <code>objdump -i</code>
(see section `objdump' in <cite>The GNU Binary Utilities</cite>) to
list all the formats available for your configuration.

</p>
<p>
<a name="IDX370"></a>
<a name="IDX371"></a>
As with most implementations, BFD is a compromise between
several conflicting requirements. The major factor influencing
BFD design was efficiency: any time used converting between
formats is time which would not have been spent had BFD not
been involved. This is partly offset by abstraction payback; since
BFD simplifies applications and back ends, more time and care
may be spent optimizing algorithms for a greater speed.

</p>
<p>
One minor artifact of the BFD solution which you should bear in
mind is the potential for information loss.  There are two places where
useful information can be lost using the BFD mechanism: during
conversion and during output. See section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC32">Information Loss</a>.

</p>



<h2><a name="SEC31" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC31">How it works: an outline of BFD</a></h2>
<p>
<a name="IDX372"></a>
When an object file is opened, BFD subroutines automatically determine
the format of the input object file.  They then build a descriptor in
memory with pointers to routines that will be used to access elements of
the object file's data structures.

</p>
<p>
As different information from the the object files is required,
BFD reads from different sections of the file and processes them.
For example, a very common operation for the linker is processing symbol
tables.  Each BFD back end provides a routine for converting
between the object file's representation of symbols and an internal
canonical format. When the linker asks for the symbol table of an object
file, it calls through a memory pointer to the routine from the
relevant BFD back end which reads and converts the table into a canonical
form.  The linker then operates upon the canonical form. When the link is
finished and the linker writes the output file's symbol table,
another BFD back end routine is called to take the newly
created symbol table and convert it into the chosen output format.

</p>



<h3><a name="SEC32" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC32">Information Loss</a></h3>

<p>
<em>Information can be lost during output.</em> The output formats
supported by BFD do not provide identical facilities, and
information which can be described in one form has nowhere to go in
another format. One example of this is alignment information in
<code>b.out</code>. There is nowhere in an <code>a.out</code> format file to store
alignment information on the contained data, so when a file is linked
from <code>b.out</code> and an <code>a.out</code> image is produced, alignment
information will not propagate to the output file. (The linker will
still use the alignment information internally, so the link is performed
correctly).

</p>
<p>
Another example is COFF section names. COFF files may contain an
unlimited number of sections, each one with a textual section name. If
the target of the link is a format which does not have many sections (e.g.,
<code>a.out</code>) or has sections without names (e.g., the Oasys format), the
link cannot be done simply. You can circumvent this problem by
describing the desired input-to-output section mapping with the linker command
language.

</p>
<p>
<em>Information can be lost during canonicalization.</em> The BFD
internal canonical form of the external formats is not exhaustive; there
are structures in input formats for which there is no direct
representation internally.  This means that the BFD back ends
cannot maintain all possible data richness through the transformation
between external to internal and back to external formats.

</p>
<p>
This limitation is only a problem when an application reads one
format and writes another.  Each BFD back end is responsible for
maintaining as much data as possible, and the internal BFD
canonical form has structures which are opaque to the BFD core,
and exported only to the back ends. When a file is read in one format,
the canonical form is generated for BFD and the application. At the
same time, the back end saves away any information which may otherwise
be lost. If the data is then written back in the same format, the back
end routine will be able to use the canonical form provided by the
BFD core as well as the information it prepared earlier.  Since
there is a great deal of commonality between back ends,
there is no information lost when
linking or copying big endian COFF to little endian COFF, or <code>a.out</code> to
<code>b.out</code>.  When a mixture of formats is linked, the information is
only lost from the files whose format differs from the destination.

</p>


<h3><a name="SEC33" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC33">The BFD canonical object-file format</a></h3>

<p>
The greatest potential for loss of information occurs when there is the least
overlap between the information provided by the source format, that
stored by the canonical format, and that needed by the
destination format. A brief description of the canonical form may help
you understand which kinds of data you can count on preserving across
conversions.
<a name="IDX373"></a>
<a name="IDX374"></a>

</p>
<dl compact="">

<dt><em>files</em>
</dt><dd>
Information stored on a per-file basis includes target machine
architecture, particular implementation format type, a demand pageable
bit, and a write protected bit.  Information like Unix magic numbers is
not stored here--only the magic numbers' meaning, so a <code>ZMAGIC</code>
file would have both the demand pageable bit and the write protected
text bit set.  The byte order of the target is stored on a per-file
basis, so that big- and little-endian object files may be used with one
another.

</dd><dt><em>sections</em>
</dt><dd>
Each section in the input file contains the name of the section, the
section's original address in the object file, size and alignment
information, various flags, and pointers into other BFD data
structures.

</dd><dt><em>symbols</em>
</dt><dd>
Each symbol contains a pointer to the information for the object file
which originally defined it, its name, its value, and various flag
bits.  When a BFD back end reads in a symbol table, it relocates all
symbols to make them relative to the base of the section where they were
defined.  Doing this ensures that each symbol points to its containing
section.  Each symbol also has a varying amount of hidden private data
for the BFD back end.  Since the symbol points to the original file, the
private data format for that symbol is accessible.  <code>ld</code> can
operate on a collection of symbols of wildly different formats without
problems.

Normal global and simple local symbols are maintained on output, so an
output file (no matter its format) will retain symbols pointing to
functions and to global, static, and common variables.  Some symbol
information is not worth retaining; in <code>a.out</code>, type information is
stored in the symbol table as long symbol names.  This information would
be useless to most COFF debuggers; the linker has command line switches
to allow users to throw it away.

There is one word of type information within the symbol, so if the
format supports symbol type information within symbols (for example, COFF,
IEEE, Oasys) and the type is simple enough to fit within one word
(nearly everything but aggregates), the information will be preserved.

</dd><dt><em>relocation level</em>
</dt><dd>
Each canonical BFD relocation record contains a pointer to the symbol to
relocate to, the offset of the data to relocate, the section the data
is in, and a pointer to a relocation type descriptor. Relocation is
performed by passing messages through the relocation type
descriptor and the symbol pointer. Therefore, relocations can be performed
on output data using a relocation method that is only available in one of the
input formats. For instance, Oasys provides a byte relocation format.
A relocation record requesting this relocation type would point
indirectly to a routine to perform this, so the relocation may be
performed on a byte being written to a 68k COFF file, even though 68k COFF
has no such relocation type.

</dd><dt><em>line numbers</em>
</dt><dd>
Object formats can contain, for debugging purposes, some form of mapping
between symbols, source line numbers, and addresses in the output file.
These addresses have to be relocated along with the symbol information.
Each symbol with an associated list of line number records points to the
first record of the list.  The head of a line number list consists of a
pointer to the symbol, which allows finding out the address of the
function whose line number is being described. The rest of the list is
made up of pairs: offsets into the section and line numbers. Any format
which can simply derive this information can pass it successfully
between formats (COFF, IEEE and Oasys).
</dd></dl>



<h1><a name="SEC34" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC34">Reporting Bugs</a></h1>
<p>
<a name="IDX375"></a>
<a name="IDX376"></a>

</p>
<p>
Your bug reports play an essential role in making <code>ld</code> reliable.

</p>
<p>
Reporting a bug may help you by bringing a solution to your problem, or
it may not.  But in any case the principal function of a bug report is
to help the entire community by making the next version of <code>ld</code>
work better.  Bug reports are your contribution to the maintenance of
<code>ld</code>.

</p>
<p>
In order for a bug report to serve its purpose, you must include the
information that enables us to fix the bug.

</p>



<h2><a name="SEC35" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC35">Have you found a bug?</a></h2>
<p>
<a name="IDX377"></a>

</p>
<p>
If you are not sure whether you have found a bug, here are some guidelines:

</p>

<ul>
<li>

<a name="IDX378"></a>
 <a name="IDX379"></a>
 <a name="IDX380"></a>
 
If the linker gets a fatal signal, for any input whatever, that is a
<code>ld</code> bug.  Reliable linkers never crash.

<a name="IDX381"></a>
</li><li>

If <code>ld</code> produces an error message for valid input, that is a bug.

<a name="IDX382"></a>
</li><li>

If <code>ld</code> does not produce an error message for invalid input, that
may be a bug.  In the general case, the linker can not verify that
object files are correct.

</li><li>

If you are an experienced user of linkers, your suggestions for
improvement of <code>ld</code> are welcome in any case.
</li></ul>



<h2><a name="SEC36" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC36">How to report bugs</a></h2>
<p>
<a name="IDX383"></a>
<a name="IDX384"></a>

</p>
<p>
A number of companies and individuals offer support for GNU
products.  If you obtained <code>ld</code> from a support organization, we
recommend you contact that organization first.

</p>
<p>
You can find contact information for many support companies and
individuals in the file <tt>`etc/SERVICE'</tt> in the GNU Emacs
distribution.

</p>
<p>
In any event, we also recommend that you send bug reports for <code>ld</code>
to <samp>`bug-gnu-utils@gnu.org'</samp>.

</p>
<p>
The fundamental principle of reporting bugs usefully is this:
<strong>report all the facts</strong>.  If you are not sure whether to state a
fact or leave it out, state it!

</p>
<p>
Often people omit facts because they think they know what causes the
problem and assume that some details do not matter.  Thus, you might
assume that the name of a symbol you use in an example does not matter.
Well, probably it does not, but one cannot be sure.  Perhaps the bug is
a stray memory reference which happens to fetch from the location where
that name is stored in memory; perhaps, if the name were different, the
contents of that location would fool the linker into doing the right
thing despite the bug.  Play it safe and give a specific, complete
example.  That is the easiest thing for you to do, and the most helpful.

</p>
<p>
Keep in mind that the purpose of a bug report is to enable us to fix the bug if
it is new to us.  Therefore, always write your bug reports on the assumption
that the bug has not been reported previously.

</p>
<p>
Sometimes people give a few sketchy facts and ask, "Does this ring a
bell?"  Those bug reports are useless, and we urge everyone to
<em>refuse to respond to them</em> except to chide the sender to report
bugs properly.

</p>
<p>
To enable us to fix the bug, you should include all these things:

</p>

<ul>
<li>

The version of <code>ld</code>.  <code>ld</code> announces it if you start it with
the <samp>`--version'</samp> argument.

Without this, we will not know whether there is any point in looking for
the bug in the current version of <code>ld</code>.

</li><li>

Any patches you may have applied to the <code>ld</code> source, including any
patches made to the <code>BFD</code> library.

</li><li>

The type of machine you are using, and the operating system name and
version number.

</li><li>

What compiler (and its version) was used to compile <code>ld</code>---e.g.
"<code>gcc-2.7</code>".

</li><li>

The command arguments you gave the linker to link your example and
observe the bug.  To guarantee you will not omit something important,
list them all.  A copy of the Makefile (or the output from make) is
sufficient.

If we were to try to guess the arguments, we would probably guess wrong
and then we might not encounter the bug.

</li><li>

A complete input file, or set of input files, that will reproduce the
bug.  It is generally most helpful to send the actual object files,
uuencoded if necessary to get them through the mail system.  Making them
available for anonymous FTP is not as good, but may be the only
reasonable choice for large object files.

If the source files were assembled using <code>gas</code> or compiled using
<code>gcc</code>, then it may be OK to send the source files rather than the
object files.  In this case, be sure to say exactly what version of
<code>gas</code> or <code>gcc</code> was used to produce the object files.  Also say
how <code>gas</code> or <code>gcc</code> were configured.

</li><li>

A description of what behavior you observe that you believe is
incorrect.  For example, "It gets a fatal signal."

Of course, if the bug is that <code>ld</code> gets a fatal signal, then we
will certainly notice it.  But if the bug is incorrect output, we might
not notice unless it is glaringly wrong.  You might as well not give us
a chance to make a mistake.

Even if the problem you experience is a fatal signal, you should still
say so explicitly.  Suppose something strange is going on, such as, your
copy of <code>ld</code> is out of synch, or you have encountered a bug in the
C library on your system.  (This has happened!)  Your copy might crash
and ours would not.  If you told us to expect a crash, then when ours
fails to crash, we would know that the bug was not happening for us.  If
you had not told us to expect a crash, then we would not be able to draw
any conclusion from our observations.

</li><li>

If you wish to suggest changes to the <code>ld</code> source, send us context
diffs, as generated by <code>diff</code> with the <samp>`-u'</samp>, <samp>`-c'</samp>, or
<samp>`-p'</samp> option.  Always send diffs from the old file to the new file.
If you even discuss something in the <code>ld</code> source, refer to it by
context, not by line number.

The line numbers in our development sources will not match those in your
sources.  Your line numbers would convey no useful information to us.
</li></ul>

<p>
Here are some things that are not necessary:

</p>

<ul>
<li>

A description of the envelope of the bug.

Often people who encounter a bug spend a lot of time investigating
which changes to the input file will make the bug go away and which
changes will not affect it.

This is often time consuming and not very useful, because the way we
will find the bug is by running a single example under the debugger
with breakpoints, not by pure deduction from a series of examples.
We recommend that you save your time for something else.

Of course, if you can find a simpler example to report <em>instead</em>
of the original one, that is a convenience for us.  Errors in the
output will be easier to spot, running under the debugger will take
less time, and so on.

However, simplification is not vital; if you do not want to do this,
report the bug anyway and send us the entire test case you used.

</li><li>

A patch for the bug.

A patch for the bug does help us if it is a good one.  But do not omit
the necessary information, such as the test case, on the assumption that
a patch is all we need.  We might see problems with your patch and decide
to fix the problem another way, or we might not understand it at all.

Sometimes with a program as complicated as <code>ld</code> it is very hard to
construct an example that will make the program follow a certain path
through the code.  If you do not send us the example, we will not be
able to construct one, so we will not be able to verify that the bug is
fixed.

And if we cannot understand what bug you are trying to fix, or why your
patch should be an improvement, we will not install it.  A test case will
help us to understand.

</li><li>

A guess about what the bug is or what it depends on.

Such guesses are usually wrong.  Even we cannot guess right about such
things without first using the debugger to find the facts.
</li></ul>



<h1><a name="SEC37" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC37">MRI Compatible Script Files</a></h1>
<p>
<a name="IDX385"></a>
To aid users making the transition to GNU <code>ld</code> from the MRI
linker, <code>ld</code> can use MRI compatible linker scripts as an
alternative to the more general-purpose linker scripting language
described in section <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC5">Command Language</a>.  MRI compatible linker
scripts have a much simpler command set than the scripting language
otherwise used with <code>ld</code>.  GNU <code>ld</code> supports the most
commonly used MRI linker commands; these commands are described here.

</p>
<p>
In general, MRI scripts aren't of much use with the <code>a.out</code> object
file format, since it only has three sections and MRI scripts lack some
features to make use of them.

</p>
<p>
You can specify a file containing an MRI-compatible script using the
<samp>`-c'</samp> command-line option.

</p>
<p>
Each command in an MRI-compatible script occupies its own line; each
command line starts with the keyword that identifies the command (though
blank lines are also allowed for punctuation).  If a line of an
MRI-compatible script begins with an unrecognized keyword, <code>ld</code>
issues a warning message, but continues processing the script.

</p>
<p>
Lines beginning with <samp>`*'</samp> are comments.

</p>
<p>
You can write these commands using all upper-case letters, or all
lower case; for example, <samp>`chip'</samp> is the same as <samp>`CHIP'</samp>.
The following list shows only the upper-case form of each command.

</p>
<dl compact="">

<dt><code>ABSOLUTE <var>secname</var></code>
</dt><dd>
<a name="IDX386"></a>
 
</dd><dt><code>ABSOLUTE <var>secname</var>, <var>secname</var>, ... <var>secname</var></code>
</dt><dd>
Normally, <code>ld</code> includes in the output file all sections from all
the input files.  However, in an MRI-compatible script, you can use the
<code>ABSOLUTE</code> command to restrict the sections that will be present in
your output program.  If the <code>ABSOLUTE</code> command is used at all in a
script, then only the sections named explicitly in <code>ABSOLUTE</code>
commands will appear in the linker output.  You can still use other
input sections (whatever you select on the command line, or using
<code>LOAD</code>) to resolve addresses in the output file.

<a name="IDX387"></a>
</dd><dt><code>ALIAS <var>out-secname</var>, <var>in-secname</var></code>
</dt><dd>
Use this command to place the data from input section <var>in-secname</var>
in a section called <var>out-secname</var> in the linker output file.

<var>in-secname</var> may be an integer.

<a name="IDX388"></a>
</dd><dt><code>ALIGN <var>secname</var> = <var>expression</var></code>
</dt><dd>
Align the section called <var>secname</var> to <var>expression</var>.  The
<var>expression</var> should be a power of two.

<a name="IDX389"></a>
</dd><dt><code>BASE <var>expression</var></code>
</dt><dd>
Use the value of <var>expression</var> as the lowest address (other than
absolute addresses) in the output file.

<a name="IDX390"></a>
</dd><dt><code>CHIP <var>expression</var></code>
</dt><dd>
</dd><dt><code>CHIP <var>expression</var>, <var>expression</var></code>
</dt><dd>
This command does nothing; it is accepted only for compatibility.

<a name="IDX391"></a>
</dd><dt><code>END</code>
</dt><dd>
This command does nothing whatever; it's only accepted for compatibility.

<a name="IDX392"></a>
</dd><dt><code>FORMAT <var>output-format</var></code>
</dt><dd>
Similar to the <code>OUTPUT_FORMAT</code> command in the more general linker
language, but restricted to one of these output formats: 


<ol>
<li>

S-records, if <var>output-format</var> is <samp>`S'</samp>

</li><li>

IEEE, if <var>output-format</var> is <samp>`IEEE'</samp>

</li><li>

COFF (the <samp>`coff-m68k'</samp> variant in BFD), if <var>output-format</var> is
<samp>`COFF'</samp>
</li></ol>

<a name="IDX393"></a>
</dd><dt><code>LIST <var>anything</var>...</code>
</dt><dd>
Print (to the standard output file) a link map, as produced by the
<code>ld</code> command-line option <samp>`-M'</samp>.

The keyword <code>LIST</code> may be followed by anything on the
same line, with no change in its effect.

<a name="IDX394"></a>
</dd><dt><code>LOAD <var>filename</var></code>
</dt><dd>
</dd><dt><code>LOAD <var>filename</var>, <var>filename</var>, ... <var>filename</var></code>
</dt><dd>
Include one or more object file <var>filename</var> in the link; this has the
same effect as specifying <var>filename</var> directly on the <code>ld</code>
command line.

<a name="IDX395"></a>
</dd><dt><code>NAME <var>output-name</var></code>
</dt><dd>
<var>output-name</var> is the name for the program produced by <code>ld</code>; the
MRI-compatible command <code>NAME</code> is equivalent to the command-line
option <samp>`-o'</samp> or the general script language command <code>OUTPUT</code>.

<a name="IDX396"></a>
</dd><dt><code>ORDER <var>secname</var>, <var>secname</var>, ... <var>secname</var></code>
</dt><dd>
</dd><dt><code>ORDER <var>secname</var> <var>secname</var> <var>secname</var></code>
</dt><dd>
Normally, <code>ld</code> orders the sections in its output file in the
order in which they first appear in the input files.  In an MRI-compatible
script, you can override this ordering with the <code>ORDER</code> command.  The
sections you list with <code>ORDER</code> will appear first in your output
file, in the order specified.

<a name="IDX397"></a>
</dd><dt><code>PUBLIC <var>name</var>=<var>expression</var></code>
</dt><dd>
</dd><dt><code>PUBLIC <var>name</var>,<var>expression</var></code>
</dt><dd>
</dd><dt><code>PUBLIC <var>name</var> <var>expression</var></code>
</dt><dd>
Supply a value (<var>expression</var>) for external symbol
<var>name</var> used in the linker input files.

<a name="IDX398"></a>
</dd><dt><code>SECT <var>secname</var>, <var>expression</var></code>
</dt><dd>
</dd><dt><code>SECT <var>secname</var>=<var>expression</var></code>
</dt><dd>
</dd><dt><code>SECT <var>secname</var> <var>expression</var></code>
</dt><dd>
You can use any of these three forms of the <code>SECT</code> command to
specify the start address (<var>expression</var>) for section <var>secname</var>.
If you have more than one <code>SECT</code> statement for the same
<var>secname</var>, only the <em>first</em> sets the start address.
</dd></dl>



<h1><a name="SEC38" href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#TOC38">Index</a></h1>

<p>
Jump to:
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_" "="">"</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_*">*</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_-">-</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_.">.</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_0">0</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_:">:</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_;">;</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_=">=</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_%3E">&gt;</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_[">[</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_a">a</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_b">b</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_c">c</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_d">d</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_e">e</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_f">f</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_g">g</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_h">h</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_i">i</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_k">k</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_l">l</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_m">m</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_n">n</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_o">o</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_p">p</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_q">q</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_r">r</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_s">s</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_t">t</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_u">u</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_v">v</a>
-
<a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#cindex_w">w</a>
</p><p>
</p><h2><a name="cindex_" "="">"</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX211">"</a>
</li></dir>
<h2><a name="cindex_*">*</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX278">*( COMMON )</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX274">*(<var>section</var>)</a>
</li></dir>
<h2><a name="cindex_-">-</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX103">-(</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX10">--architecture=<var>arch</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX30">--auxiliary</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX115">--cref</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX117">--defsym <var>symbol</var>=<var>exp</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX92">--discard-all</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX95">--discard-locals</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX119">--dynamic-linker <var>file</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX126">--embedded-relocs</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX25">--entry=<var>entry</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX28">--export-dynamic</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX32">--filter</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX33">--force-exe-suffix</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX13">--format=<var>format</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX36">--gpsize</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX129">--help</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX70">--just-symbols=<var>file</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX48">--library-path=<var>dir</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX45">--library=<var>archive</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX17">--mri-script=<var>MRI-cmdfile</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX57">--nmagic</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX132">--no-keep-memory</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX133">--no-warn-mismatch</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX134">--no-whole-archive</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX136">--noinhibit-exec</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX137">--oformat</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX59">--omagic</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX63">--output=<var>output</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX53">--print-map</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX140">--relax</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX364"><code>--relax</code> on i960</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX68">--relocateable</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX82">--script=<var>script</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX153">--sort-common</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX154">--split-by-file</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX155">--split-by-reloc</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX156">--stats</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX73">--strip-all</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX76">--strip-debug</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX79">--trace</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX99">--trace-symbol=<var>symbol</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX157">--traditional-format</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX85">--undefined=<var>symbol</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX166">--verbose</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX89">--version</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX168">--version-script=<var>version-scriptfile</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX170">--warn-comon</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX173">--warn-constructors</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX174">--warn-multiple-gp</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX175">--warn-once</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX178">--warn-section-align</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX181">--whole-archive</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX183">--wrap</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX9">-A<var>arch</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX7">-a<var>keyword</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX105">-assert <var>keyword</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX12">-b <var>format</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX106">-Bdynamic</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX151">-Bshareable</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX109">-Bstatic</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX113">-Bsymbolic</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX16">-c <var>MRI-cmdfile</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX108">-call_shared</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX20">-d</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX21">-dc</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX110">-dn</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX22">-dp</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX107">-dy</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX27">-E</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX24">-e <var>entry</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX122">-EB</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX124">-EL</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX31">-F</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX29">-f</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX35">-G</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX34">-g</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX39">-h<var>name</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX41">-i</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX44">-l<var>archive</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX47">-L<var>dir</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX52">-M</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX50">-m <var>emulation</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX130">-Map</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX58">-N</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX54">-n</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX111">-non_shared</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX62">-o <var>output</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX138">-qmagic</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX139">-Qy</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX67">-r</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX69">-R <var>file</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX147">-rpath</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX149">-rpath-link</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX75">-S</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX72">-s</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX150">-shared</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX40">-soname=<var>name</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX112">-static</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX78">-t</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX81">-T <var>script</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX160">-Tbss <var>org</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX161">-Tdata <var>org</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX162">-Ttext <var>org</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX84">-u <var>symbol</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX164">-Ur</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX88">-V</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX87">-v</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX94">-X</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX91">-x</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX101">-Y <var>path</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX98">-y <var>symbol</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX102">-z <var>keyword</var></a>
</li></dir>
<h2><a name="cindex_.">.</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX212">.</a>
</li></dir>
<h2><a name="cindex_0">0</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX201">0x</a>
</li></dir>
<h2><a name="cindex_:">:</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX311">:<var>phdr</var></a>
</li></dir>
<h2><a name="cindex_;">;</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX225">;</a>
</li></dir>
<h2><a name="cindex_=">=</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX314">=<var>fill</var></a>
</li></dir>
<h2><a name="cindex_&gt;">&gt;</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX308">&gt;<var>region</var></a>
</li></dir>
<h2><a name="cindex_[">[</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX275"><code>[<var>section</var>...]</code>, not supported</a>
</li></dir>
<h2><a name="cindex_a">a</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX386"><code>ABSOLUTE</code> (MRI)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX227">absolute and relocatable symbols</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX233">ABSOLUTE(<var>exp</var>)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX235">ADDR(<var>section</var>)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX387"><code>ALIAS</code> (MRI)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX388"><code>ALIGN</code> (MRI)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX239">ALIGN(<var>exp</var>)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX301">aligning sections</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX255">allocating memory</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX8">architectures</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX43">archive files, from cmd line</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX196">arithmetic</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX218">arithmetic operators</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX222">assignment in scripts</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX285">assignment, in section defn</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX305">AT ( <var>ldadr</var> )</a>
</li></dir>
<h2><a name="cindex_b">b</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX366">back end</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX389"><code>BASE</code> (MRI)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX373">BFD canonical format</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX370">BFD requirements</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX120">big-endian objects</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX340">binary input files</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX11">binary input format</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX299">BLOCK(<var>align</var>)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX377">bug criteria</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX383">bug reports</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX375">bugs in <code>ld</code></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX286">BYTE(<var>expression</var>)</a>
</li></dir>
<h2><a name="cindex_c">c</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX331">C++ constructors, arranging in link</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX390"><code>CHIP</code> (MRI)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX172">combining symbols, warnings on</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX189">command files</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX3">command line</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX191">commands, fundamental</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX194">comments</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX19">common allocation</a>, <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX336">common allocation</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX277">commons in output</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX18">compatibility, MRI</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX330">CONSTRUCTORS</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX165">constructors</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX332">constructors, arranging in link</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX267">contents of a section</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX380">crash of linker</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX282">CREATE_OBJECT_SYMBOLS</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX114">cross reference table</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX357">cross references</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX215">current output location</a>
</li></dir>
<h2><a name="cindex_d">d</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX159">dbx</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX199">decimal integers</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX187">default emulation</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX185">default input format</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX241">DEFINED(<var>symbol</var>)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX93">deleting local symbols</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX291">direct output</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX254">discontinuous memory</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX213">dot</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX118">dynamic linker, from command line</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX26">dynamic symbol table</a>
</li></dir>
<h2><a name="cindex_e">e</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX321">ELF program headers</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX49">emulation</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX188">emulation, default</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX391"><code>END</code> (MRI)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX121">endianness</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX325">entry point, defaults</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX23">entry point, from command line</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX322">ENTRY(<var>symbol</var>)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX381">error on valid input</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX221">expression evaluation order</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX195">expression syntax</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX234">expression, absolute</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX279">expressions in a section</a>
</li></dir>
<h2><a name="cindex_f">f</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX378">fatal signal</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX268"><var>filename</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX281">filename symbols</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX271"><var>filename</var>(<var>section</var>)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX272">files and sections, section defn</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX270">files, including in output sections</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX316">fill pattern, entire section</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX292">FILL(<var>expression</var>)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX353">first input file</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX324">first instruction</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX333">FLOAT</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX335">FORCE_COMMON_ALLOCATION</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX392"><code>FORMAT</code> (MRI)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX348">format, output file</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX232">functions in expression language</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX190">fundamental script commands</a>
</li></dir>
<h2><a name="cindex_g">g</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX1">GNU linker</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX184">GNUTARGET</a>, <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX356">GNUTARGET</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX341">GROUP ( <var>files</var> )</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX342">grouping input files</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX104">groups of archives</a>
</li></dir>
<h2><a name="cindex_h">h</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX360">H8/300 support</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX248">header size</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX127">help</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX200">hexadecimal integers</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX216">holes</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX293">holes, filling</a>
</li></dir>
<h2><a name="cindex_i">i</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX363">i960 support</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX337">INCLUDE <var>filename</var></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX338">including a linker script</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX182">including an entire archive</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX42">incremental link</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX339">INPUT ( <var>files</var> )</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX354">input file format</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX280">input filename symbols</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX80">input files, displaying</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX269">input files, section defn</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX14">input format</a>, <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX15">input format</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX273">input sections to output section</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX197">integer notation</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX207">integer suffixes</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX374">internal object-file format</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX382">invalid input</a>
</li></dir>
<h2><a name="cindex_k">k</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX204">K and M integer suffixes</a>
</li></dir>
<h2><a name="cindex_l">l</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX263">l =</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX97">L, deleting symbols beginning</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX193">layout of output file</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX220">lazy evaluation</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX384"><code>ld</code> bugs, reporting</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX186">LDEMULATION</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX262">len =</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX261">LENGTH =</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX51">link map</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX148">link-time runtime library search path</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX379">linker crash</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX393"><code>LIST</code> (MRI)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX123">little-endian objects</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX394"><code>LOAD</code> (MRI)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX307">load address, specifying</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX237">LOADADDR(<var>section</var>)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX304">loading, preventing</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX96">local symbols, deleting</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX214">location counter</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX288">LONG(<var>expression</var>)</a>
</li></dir>
<h2><a name="cindex_m">m</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX205">M and K integer suffixes</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX346">machine architecture, output</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX359">machine dependencies</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX250">MAX</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX252">MEMORY</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX257">memory region attributes</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX310">memory regions and sections</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX131">memory usage</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX251">MIN</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX125">MIPS embedded PIC code</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX385">MRI compatibility</a>
</li></dir>
<h2><a name="cindex_n">n</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX395"><code>NAME</code> (MRI)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX209">names</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX256">naming memory regions</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX266">naming output sections</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX64">naming the output file</a>, <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX344">naming the output file</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX202">negative integers</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX243">NEXT(<var>exp</var>)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX56">NMAGIC</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX358">NOCROSSREFS ( <var>sections</var> )</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX334">NOFLOAT</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX302">NOLOAD</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX230">Non constant expression</a>
</li></dir>
<h2><a name="cindex_o">o</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX259">o =</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX369">objdump -i</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX367">object file management</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX6">object files</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX368">object formats available</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX37">object size</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX198">octal integers</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX61">OMAGIC</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX372">opening object files</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX217">Operators for arithmetic</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX4">options</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX396"><code>ORDER</code> (MRI)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX260">org =</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX258">ORIGIN =</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX343">OUTPUT ( <var>filename</var> )</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX135">output file after errors</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX192">output file layout</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX345">OUTPUT_ARCH ( <var>bfdname</var> )</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX347">OUTPUT_FORMAT ( <var>bfdname</var> )</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX317">OVERLAY</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX318">overlays</a>
</li></dir>
<h2><a name="cindex_p">p</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX65">partial link</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX350">path for libraries</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX319">PHDRS</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX219">precedence in expressions</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX303">prevent unnecessary loading</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX320">program headers</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX313">program headers and sections</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX231">provide</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX397"><code>PUBLIC</code> (MRI)</a>
</li></dir>
<h2><a name="cindex_q">q</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX289">QUAD(<var>expression</var>)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX210">quoted symbol names</a>
</li></dir>
<h2><a name="cindex_r">r</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX55">read-only text</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX60">read/write from cmd line</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX253">regions of memory</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX142">relaxing addressing modes</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX361">relaxing on H8/300</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX365">relaxing on i960</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX228">relocatable and absolute symbols</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX66">relocatable output</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX376">reporting bugs in <code>ld</code></a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX371">requirements for BFD</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX143">retaining specified symbols</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX240">rounding up location counter</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX38">runtime library name</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX146">runtime library search path</a>
</li></dir>
<h2><a name="cindex_s">s</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX203">scaled integers</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX83">script files</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX46">search directory, from cmd line</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX351">search path, libraries</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX349">SEARCH_DIR ( <var>path</var> )</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX398"><code>SECT</code> (MRI)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX236">section address</a>, <a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX298">section address</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX300">section alignment</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX180">section alignment, warnings on</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX265">section definition</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX295">section defn, full syntax</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX315">section fill pattern</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX238">section load address</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX246">section size</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX297">section start</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX309">section, assigning to memory region</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX312">section, assigning to program header</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX264">SECTIONS</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX163">segment origins, cmd line</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX226">semicolon</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX152">shared libraries</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX287">SHORT(<var>expression</var>)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX245">SIZEOF(<var>section</var>)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX249">sizeof_headers</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX247">SIZEOF_HEADERS</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX306">specify load address</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX290">SQUAD(<var>expression</var>)</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX5">standard Unix system</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX296">start address, section</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX323">start of execution</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX352">STARTUP ( <var>filename</var> )</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX74">strip all symbols</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX77">strip debugger symbols</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX144">stripping all but some symbols</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX206">suffixes for integers</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX242">symbol defaults</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX223">symbol definition, scripts</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX208">symbol names</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX100">symbol tracing</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX327">symbol versions</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX71">symbol-only input</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX283"><var>symbol</var> = <var>expression</var> ;</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX284"><var>symbol</var> <var>f</var>= <var>expression</var> ;</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX116">symbols, from command line</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX229">symbols, relocatable and absolute</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX145">symbols, retaining selectively</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX141">synthesizing linker</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX362">synthesizing on H8/300</a>
</li></dir>
<h2><a name="cindex_t">t</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX355">TARGET ( <var>format</var> )</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX158">traditional format</a>
</li></dir>
<h2><a name="cindex_u">u</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX244">unallocated address, next</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX86">undefined symbol</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX177">undefined symbols, warnings on</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX276">uninitialized data</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX294">unspecified memory</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX128">usage</a>
</li></dir>
<h2><a name="cindex_v">v</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX224">variables, defining</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX167">verbose</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX90">version</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX328">version script</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX169">version script, symbol versions</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX326">VERSION {script text}</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX329">versions of symbols</a>
</li></dir>
<h2><a name="cindex_w">w</a></h2>
<dir>
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX171">warnings, on combining symbols</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX179">warnings, on section alignment</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX176">warnings, on undefined symbols</a>
</li><li><a href="https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#IDX2">what is this?</a>
</li></dir>

<p></p>

<p></p><hr><p>
This document was generated on 7 November 1998 using the
<a href="http://wwwinfo.cern.ch/dis/texi2html/">texi2html</a>
translator version 1.52.</p>


<audio controls="controls" style="display: none;"></audio></body><style type="text/css">#yddContainer{display:block;font-family:Microsoft YaHei;position:relative;width:100%;height:100%;top:-4px;left:-4px;font-size:12px;border:1px solid}#yddTop{display:block;height:22px}#yddTopBorderlr{display:block;position:static;height:17px;padding:2px 28px;line-height:17px;font-size:12px;color:#5079bb;font-weight:bold;border-style:none solid;border-width:1px}#yddTopBorderlr .ydd-sp{position:absolute;top:2px;height:0;overflow:hidden}.ydd-icon{left:5px;width:17px;padding:0px 0px 0px 0px;padding-top:17px;background-position:-16px -44px}.ydd-close{right:5px;width:16px;padding-top:16px;background-position:left -44px}#yddKeyTitle{float:left;text-decoration:none}#yddMiddle{display:block;margin-bottom:10px}.ydd-tabs{display:block;margin:5px 0;padding:0 5px;height:18px;border-bottom:1px solid}.ydd-tab{display:block;float:left;height:18px;margin:0 5px -1px 0;padding:0 4px;line-height:18px;border:1px solid;border-bottom:none}.ydd-trans-container{display:block;line-height:160%}.ydd-trans-container a{text-decoration:none;}#yddBottom{position:absolute;bottom:0;left:0;width:100%;height:22px;line-height:22px;overflow:hidden;background-position:left -22px}.ydd-padding010{padding:0 10px}#yddWrapper{color:#252525;z-index:10001;background:url(chrome-extension://eopjamdnofihpioajgfdikhhbobonhbb/ab20.png);}#yddContainer{background:#fff;border-color:#4b7598}#yddTopBorderlr{border-color:#f0f8fc}#yddWrapper .ydd-sp{background-image:url(chrome-extension://eopjamdnofihpioajgfdikhhbobonhbb/ydd-sprite.png)}#yddWrapper a,#yddWrapper a:hover,#yddWrapper a:visited{color:#50799b}#yddWrapper .ydd-tabs{color:#959595}.ydd-tabs,.ydd-tab{background:#fff;border-color:#d5e7f3}#yddBottom{color:#363636}#yddWrapper{min-width:250px;max-width:400px;}</style></html>